Page 1 of 1

Magick++ How to save MIFF -w- Zip Compression

Posted: 2014-01-28T18:45:15-07:00
by Bob-O-Rama
Hi,

I'm using Magick++ and have a completely stupid question...

I want to write out an image in a compressed MIFF format. in other words similar to the convert -compress Zip option. The compression levels for MIFF are RLE, Zip, etc.. How do I specify this? I current have something like....

// my_Image created through steps too numerous to mention...
my_image.depth( 16 );
my_image.quality( 100 );
my_image.write( "output.MIFF" );

I get a nice, fat, 6 bytes / pixel MIFF file. With -compress Zip option I can get that to about 25% its original size, which saves on I/O which is the real performance limiting issue at this point.

Thanks!

-- Bob

Re: Magick++ How to save MIFF -w- Zip Compression

Posted: 2014-01-28T22:53:46-07:00
by dlemstra
You are looking for the following:

Code: Select all

my_image.compressType(ZipCompression);

Re: Magick++ How to save MIFF -w- Zip Compression

Posted: 2014-01-29T07:12:22-07:00
by Bob-O-Rama
I knew I was being an idiot. I just could not come up with that to save my life.

Thanks a million, hopefully with compression about 250,000.

-- Bob