in reply to Re: Perl GD
in thread Perl GD
It prints the png binary data an my command shell crash. But i actually solved the problem with this code:my $old = Image::Resize->new($explimg); my $new = $old->resize(800, 600);
use GD; my $GDimage = newFromPng GD::Image("imago_temp.png"); my ($width,$height) = $GDimage->getBounds() ; $newimage = GD::Image->new(800,600); $newimage->copyResampled($GDimage,0,0,0,0,800,600 ,$width,$height) +; open (DISPLAY, ">snapshot.jpg"); binmode DISPLAY; print DISPLAY $newimage->jpeg(100); close (DISPLAY);
|
|---|