VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-gm-chop-function/

⇱ Node.js GM chop() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js GM chop() Function

Last Updated : 28 Apr, 2025

The chop() function is an inbuilt function in the GraphicsMagick library which is used to remove pixels from the interior of an image. The function returns the true value of success. 

Syntax:

chop( width, height, x, y )

Parameters: This function accepts four parameters as mentioned above and described below:

  • width: This parameter is used to specify the width from which the image is to be chopped.
  • height: This parameter is used to specify the height from which the image is to be chopped.
  • x: This parameter is used to specify the x-coordinates from the width.
  • y: This parameter is used to specify the y-coordinates from height.

Return Value: This function returns the GraphicsMagick object. 

Example 1: 

Output:

 👁 Image
 

Example 2: 

Output:

 👁 Image
 

Reference:

Comment

Explore