Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

GMImage.Chop

Chop image (remove vertical or horizontal subregion of image).

Component Version macOS Windows Linux Server iOS SDK
GraphicsMagick 2.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "GMImage.Chop"; ImageRef; Geometry )   More

Parameters

Parameter Description Example
ImageRef The image reference number. 1
Geometry The area to remove.
A Geometry is specified as a width and height "100x200". With an optional offset "100x200+10+20".
"100x200"

Result

Returns "OK" on success.

Description

Chop image (remove vertical or horizontal subregion of image).

Examples

Remove 200 pixel on the left:

Set Variable [ $Result ; Value: MBS("GMImage.Chop"; $ImageRef; "200x0") ]

Remove 200 pixel on the top:

Set Variable [ $Result ; Value: MBS("GMImage.Chop"; $ImageRef; "0x200") ]

Remove 200 pixel on the right with offset of 400:

Set Variable [ $Result ; Value: MBS("GMImage.Chop"; $ImageRef; "200x0+400") ]

Remove 200 pixel on the bottom with offset of 400:

Set Variable [ $Result ; Value: MBS("GMImage.Chop"; $ImageRef; "0x200+0+400") ]

Remove a 200x200 area at offset 200 by 200:

Set Variable [ $Result ; Value: MBS("GMImage.Chop"; $ImageRef; "200x200+200+200") ]

See also

This function checks for a license.

Created 18th August 2014, last changed 18th January 2024


GMImage.Charcoal - GMImage.ClipMask