Node.js GM paint() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The paint() function is an inbuilt function in the GraphicsMagick library which is used to simulate an oil painting. The function returns the true value of success. Syntax: paint( radius ) Parameters: This function accepts a single parameter as mentioned above and described below: radius: This parameter is used to specify the radius of the paint. Return Value: This function returns the GraphicsMagick object. Example 1: javascript // Include gm library const gm = require('gm'); // Import the image gm('1.png') // Invoke ordered Dither on // Green Channel with 50 x 60 .paint(2) // Process and Write the image .write("paint1.png", function (err) { if (!err) console.log('done'); }); Output: Example 2: javascript // Include gm library const gm = require('gm'); //Import the image gm(600, 300, 'white') // set the color for the stroke .stroke("green", 3) // Set the font .font("Helvetica.ttf", 60) // Call to drawText Function .drawText(100, 280, "GeeksforGeeks!") // Invoke paint function .paint(1.2) // Process and write the image .write("paint2.png", function (err) { if (!err) console.log('done'); }); Output: Reference: http://www.graphicsmagick.org/GraphicsMagick.html#details-painthttps://www.npmjs.com/package/gm Comment More infoAdvertise with us Next Article Node.js GM write() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies Node.js Image-Processing Node.js-GM Similar Reads Node.js GM write() Function The write() function is an inbuilt function in the GraphicsMagick library which is used to write an image to a file. If a file already exists, then it will be overwritten. The function returns the true value of success. Syntax: write( filename ) Parameters: This function accepts single parameters a 2 min read Node.js GM write() Function The write() function is an inbuilt function in the GraphicsMagick library which is used to write an image to a file. If a file already exists, then it will be overwritten. The function returns the true value of success. Syntax: write( filename ) Parameters: This function accepts single parameters a 2 min read Node.js GM raise() Function The raise() function is an inbuilt function in the GraphicsMagick library which is used to lighten or darken image edges. This will create a 3-D effect. The function returns the true value of success. Syntax: raise( width, height ) Parameters: This function accepts two parameters as mentioned above 1 min read Node.js GM raise() Function The raise() function is an inbuilt function in the GraphicsMagick library which is used to lighten or darken image edges. This will create a 3-D effect. The function returns the true value of success. Syntax: raise( width, height ) Parameters: This function accepts two parameters as mentioned above 1 min read Node.js GM sepia() Function The sepia() function is an inbuilt function in the GraphicsMagick library which is used to apply a sepia filter to an image. The function returns the true value on success.  Syntax: sepia() Parameters: This function does not accept any parameter. This function can be directly applied to the imported 1 min read Node.js GM sepia() Function The sepia() function is an inbuilt function in the GraphicsMagick library which is used to apply a sepia filter to an image. The function returns the true value on success.  Syntax: sepia() Parameters: This function does not accept any parameter. This function can be directly applied to the imported 1 min read Like