Node.js GM whitePoint() Function Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The whitePoint() function is an inbuilt function in the GraphicsMagick library which is used to make chromaticity white points. The function returns the true value of success. Syntax: whitePoint(x, y) Parameters: This function accepts two parameters as mentioned above and described below: x: This parameter is used to specify the x-coordinate of the white point.y: This parameter is used to specify the y-coordinate of the white point. Return Value: This function returns the GraphicsMagick object. Example: javascript // Include gm library const gm = require('gm'); // Import the image gm(500, 200, 'black') // Set the color for the stroke .stroke("green", 3) .background('green') .font("Helvetica.ttf", 60) .drawText(30, 160, "GeeksforGeeks!") // Invoke whitePoint function with // x, y as 250, 100 respectively. .whitePoint(250, 100) // Process and write the image .write("whitePoint1.png", function (err) { if (!err) console.log('done'); }); Output: Reference: http://www.graphicsmagick.org/GraphicsMagick.html#details-white-pointhttps://www.npmjs.com/package/gm Comment More infoAdvertise with us Next Article Node.js GM sepia() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies Node.js Image-Processing Node.js-GM Similar Reads Node.js GM paint() Function 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 param 1 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 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 whiteThreshold() Function The whiteThreshold() function is an inbuilt function in the GraphicsMagick library which is used to force all pixels above the threshold into white while leaving all pixels below the threshold unchanged. The function returns the true value of success. Syntax: whiteThreshold( intensity )whiteThresho 2 min read Node.js GM segment() Function The segment() function is an inbuilt function in the GraphicsMagick library which is used to segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. The function returns the true value on success. Syntax: thre 2 min read Node.js GM trim() Function The trim() function is an inbuilt function in the GraphicsMagick library which is used to remove edges that are exactly the same color as the corner pixels. The function returns the true value of success. Syntax: trim() Parameters: This function does not accept any parameters. Return Value: This f 1 min read Like