in reply to Re: Re: GD.pm copyResized / copyResampled errors
in thread GD.pm copyResized / copyResampled errors
use strict; use warnings; use IO::File; use GD; my $src = GD::Image->newFromJpeg('077.jpg'); my ($srcw, $srch) = $src->getBounds(); # (550, 413) my $destw = int ($srcw/3); my $desth = int ($srch/3); my $dest = GD::Image->new($destw-1, $desth-1); $dest->copyResampled($src,0,0,0,0,$destw,$desth,$srcw,$srch); my $f = new IO::File "078.jpg", "w" or die "Can not create image: $!"; binmode $f; print $f $dest->jpeg(80);
my $dest = GD::Image->new($destw, $desth); $dest->copyResampled($src,0,0,0,0,$destw+1,$desth+1,$srcw,$srch);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: GD.pm copyResized / copyResampled errors
by brianviehland (Initiate) on Feb 05, 2004 at 01:38 UTC | |
by Roger (Parson) on Feb 05, 2004 at 03:27 UTC | |
by brianviehland (Initiate) on Feb 06, 2004 at 20:29 UTC |