From: Tony Cook Date: Wed, 7 Nov 2001 01:29:08 +0000 (+0000) Subject: the examples were misleading. 2 people have been caught out, expecting X-Git-Tag: Imager-0.48^2~490 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/afe5a082372ae56acdb22d254732432e15a380c2 the examples were misleading. 2 people have been caught out, expecting these to modify the image rather than returning a new one (amagosa and Micksa) --- diff --git a/Imager.pm b/Imager.pm index a34f5a35..cf80d8bb 100644 --- a/Imager.pm +++ b/Imager.pm @@ -2962,13 +2962,14 @@ parameter they will determine the width or height respectively. If both are given the one resulting in a larger image is used. example: C<$img> is 700 pixels wide and 500 pixels tall. - $img->scale(xpixels=>400); # 400x285 - $img->scale(ypixels=>400); # 560x400 + $newimg = $img->scale(xpixels=>400); # 400x285 + $newimg = $img->scale(ypixels=>400); # 560x400 - $img->scale(xpixels=>400,ypixels=>400); # 560x400 - $img->scale(xpixels=>400,ypixels=>400,type=>min); # 400x285 + $newimg = $img->scale(xpixels=>400,ypixels=>400); # 560x400 + $newimg = $img->scale(xpixels=>400,ypixels=>400,type=>min); # 400x285 - $img->scale(scalefactor=>0.25); 175x125 $img->scale(); # 350x250 + $newimg = $img->scale(scalefactor=>0.25); 175x125 + $newimg = $img->scale(); # 350x250 if you want to create low quality previews of images you can pass C'preview'> to scale and it will use nearest neighbor