Saturday 27 February 2010

Using ImageMagick with perl to rotate/resize/etc tiff images makes them negatives

Solution is to add option=>'quantum:polarity=min-is-white' to the image object like this:

my $image = Image::Magick->new(magick=>'TIFF', option=>'quantum:polarity=min-is-white');

This is the perl equivalent (found after hours of searching the net :) of the convert.exe command line:

convert file.tif -define quantum:polarity=min-is-white -resample 200x200 [...]

No comments:

Post a Comment