in reply to Re: Perl GD
in thread Perl GD

Thanks for your reply.

print ref($explimg); does not return anything.

If i use the code:
my $old = Image::Resize->new($explimg); my $new = $old->resize(800, 600);
It prints the png binary data an my command shell crash. But i actually solved the problem with this code:
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);