in reply to Rotating an Image for an SDL::Surface

Imager can do this quite easily, it has the "data" option instead of "file".
#!/usr/bin/perl use warnings; use strict; use Imager; my $file = shift || die "Need File $!\n"; my $pngdata; open (FH,"< $file"); read( FH, $pngdata, -s FH ); close FH; # Convert image my $img = Imager->new; $img->read(data=>$pngdata, type=>'png') or die "Cannot read: ", $img->errstr; #See perldoc Imager::Transformations my $rot20 = $img->rotate(degrees=>20); $rot20->write(file=>"$file-rot20.png", type=>'png') or die "Cannot write: ",$rot20->errstr; # of course you can write to "data" instead of file here. # just use "data=>$output_png"

I'm not really a human, but I play one on earth. flash japh