Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
On the image-magick site I have found a (I assume) command line statement to make a color swap:
convert balloon.gif -fill white -opaque blue balloon_white.gif
How can I action this in a standalone script:
my $image = new Image::Magick; $image->Read($filename); etc..
Your help would be most appreciated, thanks.

Replies are listed 'Best First'.
Re: perlmagick color change.
by almut (Canon) on Oct 13, 2009 at 15:05 UTC
      Hi, Thanks for your reply. Unfortunately that didn't work. The file is .png is that going to affect anything?

        Have you tried if it works on the command line with the regular ImageMagick convert command (as you've quoted)?  PerlMagick wouldn't be applying any other magick, essentially...

        Not all operations make sense with all image types, such as "indexed" vs. "truecolor" (PNGs may be either).   Could you provide a sample image?