Page 1 of 1

Transpose command line into Perl Script

Posted: 2014-03-20T07:06:41-07:00
by robertraiz
Hello,
I could not figure out how to transpose this into Perl syntax. The idea is that I have PNG32 images and I would need to convert them with the following settings to png8:

Code: Select all

my_image.png -colors 256 PNG8:my_image.png
- work great in command line with desired output

I tried with

Code: Select all

$my_image->Set(depth => 8);
but I still get the PNG32. How can I make this happen?

Thank you

Re: Transpose command line into Perl Script

Posted: 2014-03-20T09:28:10-07:00
by robertraiz
I think I managed with:

Code: Select all

$my_image->Quantize(colors=> 256);
$my_image->Set('png:format' => 'png8');
Would this be the correct way? If you guys now something faster, do say.

Thank you