PerlMagick Equivalent for -define png:color-type
Posted: 2012-08-14T17:16:34-07:00
At the command line, the following creates a white image in PNG format with the desired bit depth and color type for my application:
How do I do the same with PerlMagick? The following doesn't work, because libpng bails when testing color_type == 2
It seems like the -define png:color-type=2 is what I need through PerMagick, but any other ointments or salves are appreciated.
Code: Select all
convert -size 500x500 -type TrueColor -define png:color-type=2 canvas:white ick.png
Code: Select all
$blank=Image::Magick->new(size=>"500x500",magick=>'png',type=>'TrueColorMatte',depth=>8);
$blank->Write("/tmp/mypng.png");