http://www.perlmonks.org?node_id=1098241


in reply to ImageMagick - why do these snippets act differently?

Try setting the depth of the new image to 8 (it defaults to 16)
$opimage->Set(magick=>'RGB', depth=>8);
You can get the depth of the original image like this:
my $depth = $ipimage->Get('depth');

Replies are listed 'Best First'.
Re^2: ImageMagick - why do these snippets act differently?
by pete_l (Novice) on Aug 22, 2014 at 17:10 UTC
    Try setting the depth of the new image to 8 (it defaults to 16)

    Thank you, that cracked it!