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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bob-O-Rama
Posts: 31
Joined: 2007-11-23T15:34:51-07:00

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

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

You are looking for the following:

Code: Select all

my_image.compressType(ZipCompression);
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Bob-O-Rama
Posts: 31
Joined: 2007-11-23T15:34:51-07:00

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

Post 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
Post Reply