Name

geometry — shortcut for specifying width and height

Synopsis

$image->Set(geometry=>string)
$image->Get('geometry')

The geometry attribute is a convenience name that allows you to specify the width and height, or a region of an image with an offset in a single string. For example:

geometry=>'640x800'

is equivalent to:

width=>640, height=>800

To refer to a 20 × 20 region of pixels starting at coordinate (100, 150), use:

geometry=>'20x20+100+150'

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.