Hi
I found this code sample that converts from GD to Image::Magick objects. It is like I want to do and it should work between any objects.
Haukex, I will give your code a go.
#!/user/bin/perl use strict; use Image::Magick; use GD; # First read an image with Image::Magick my $im = new Image::Magick; my $status = $im->Read('monkey.png'); if ($status) { die "$Status!"; } # Convert to a blob and hand off to GD my @blobs = $im->ImageToBlob(); my $gd = GD::Image->newFromPngData($blobs[0]); my $red = $gd->colorAllocate(255,0,0); # Outline in Red $dg->rectangle(0,0, (map {$_-1} $gd-?getBounds), $red); # There and back again my $im2 = new Image::Magick; $im2->BlobToImage($gd->png()); $im2->Write('png:monkeyout.png');
In reply to Re^3: Howto convert Image::Grab jpg object to Image::Magick object???
by dazz
in thread Howto convert Image::Grab jpg object to Image::Magick object???
by dazz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |