Name
Chop( ) — remove a portion of an image
Synopsis
$image->(geometry=>geometry,
width=>integer,
height=>integer,
x=>integer,
y=>integer)
Chop( )
will
remove a portion of
an image starting at the offsetx, y, as shown in
Figure 5.4. The columns x
through x+width
and the rows y
through y+height
will be chopped. If
width
and
height
are not specified, they are assumed to be
the maximum width and height of the image.
Geometry
may be used as a shortcut for
width
and height
. Figure 5.4 and Figure 5.3 compare
Crop( )
with Chop( )
.
Figure 5-3. $image->Chop(’30x30+90+25')
Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.