From c6828fe40c1e48b24efff97983b28f6378318541 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 31 Jul 2007 13:01:05 +0000 Subject: [PATCH] make it even clearer that scale() and variants don't modify the source --- TODO | 2 +- lib/Imager/Transformations.pod | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index fa60c482..fac5e1c9 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,7 @@ RGB file support (#8666) (done) convert() doesn't preserve sample size (#28492) (done) -be explicit that scale*() doesn't modify the source (#28570) +be explicit that scale*() doesn't modify the source (#28570) (done) new color counting code (#28142) diff --git a/lib/Imager/Transformations.pod b/lib/Imager/Transformations.pod index 78412a99..43bbb33d 100644 --- a/lib/Imager/Transformations.pod +++ b/lib/Imager/Transformations.pod @@ -99,7 +99,7 @@ wide and 500 pixels tall. $newimg = $img->scale(scalefactor=>0.25); 175x125 $newimg = $img->scale(); # 350x250 -if you want to create low quality previews of images you can pass +If you want to create low quality previews of images you can pass C'preview'> to scale and it will use nearest neighbor sampling instead of filtering. It is much faster but also generates worse looking images - especially if the original has a lot of sharp @@ -210,7 +210,8 @@ or by supplying C and C and setting C to my $scaled = $im->scale(xpixels => 200, ypixels => 200, type => 'nonprop'); -Returns the scaled image on success. +Returns a new scaled image on success. The source image is not +modified. Returns false on failure, check the errstr() method for the reason for failure. @@ -278,7 +279,8 @@ pixels - the new width of the image. =back -Returns the scaled image on success. +Returns a new scaled image on success. The source image is not +modified. Returns false on failure, check the errstr() method for the reason for failure. @@ -306,7 +308,8 @@ pixels - the new height of the image. =back -Returns the scaled image on success. +Returns a new scaled image on success. The source image is not +modified. Returns false on failure, check the errstr() method for the reason for failure. -- 2.39.5