p5.js Image Complete Reference Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The p5.js Image is used to do the draw operation on the image. There are some specific attributes to do these kinds of operations and some functions to load or display the image, mentioned below. p5.js save Description saveCanvas()This function is used to save a p5.Table object to a file. p5.Image Description save()It is used to save the image to a file by forcing the browser to download it. filter()It is used to apply the filter to the image. resize()It is used to resize the image to the given width and height. numFrames()It is used to return the total number of frames of the GIF animation. reset()It js is used to restart an animated GIF and play it from its beginning state. delay()It is used to change the delay between each frame in a GIF animation. mask()It is used to apply the given mask to the image. setFrame()It is used to set the index of the currently visible frame of the GIF animation. getCurrentFrame()It is used to return the index of the currently shown frame of the GIF animation. Loading and Displaying Pixels Description loadImage()It is used to load an image from the given path and create a p5.Image object with the image. tint()This function is used to set a fill value for images. noTint()It removes the fill value for images that has been previously applied using the tint() function. imageMode()It function is used to set the image mode of an image. filter()It function is used to apply filters to the canvas. Comment More info G ghoshsuman0129 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-p5.js p5.js-Image Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings6 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in Javascript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readJavascript Scope3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like