Name
Scale( ) — scale an image to given dimensions
Synopsis
$image->Scale(geometry=>geometry,
width=>integer,
height=>
integer
)
Scale( )
will
change the size of
an image to the given dimensions. The dimensions may be specified
either as absolute pixel sizes:
$image->Scale('300x300'); # scales the image to 300 pixels by 300 pixels
or by percentages for proportional scaling:
$image->Scale('300%x300%'); # makes the image three times larger $image->Scale('300%'); # same thing
Use the Transform( )
method to scale an image
and automatically apply an intelligent sharpening filter that will
give better results than Scale( )
in most cases.
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.