PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
I am getting his error when I used Graphics::DZI which must also use Image::Magick
Attribute <image> does not pass the type constraint because: Validation failed for 'Image::Magick' with value record-image.jpg <not isa Image::Magick> at ...
#write_file ("xxx.xml", $dzi->descriptor);
$dzi->iterate ();
# !!! this does only display the tiles on the screen
# !!! see Graphics::DZI::Files for a subclass which
# !!! actually writes to files
Sorry, I don't know Perl and I've never heard of DZI. But the documentation http://www.imagemagick.org/script/perl-magick.php#read tells me that Read() returns the number of images read. $x becomes a number, not an image. Passing a number instead of an image to Graphics::DZI->new() won't work.
There are plenty of examples in this forum that will, I think, work for you.