#!/usr/bin/perl use Image::Magick; my $image=Image::Magick->new(format=>'PNG',size='10x10'); # critical to solution was this "format" key my $err=$image->Read("canvas:orange"); warn "$err" if $err; # these are good ideas because PerlMagick sometimes fails silently $err=$image->Write("CANVAS_ORANGE.png"); warn "$err" if $err; my $other=Image::Magick->new; my $err=$other->Read("CANVAS_ORANGE.png"); warn "$err" if $err; my $format=$other->Get('format'); my $magick=$other->Get('magick'); print "Format:$format Magick:$magick\n";