SOLVED: -quality and MIFF

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

SOLVED: -quality and MIFF

Post by snibgo »

In http://www.imagemagick.org/script/comma ... hp#quality , under quality, documentation says:
For the MIFF image format, quality/10 is the zlib compression level, which is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect on the image appearance, since the compression is always lossless.
However, trying quality from 0 to 99 shows no difference in resulting file size, and only minimal difference in speed, probably a natural random variation.

Code: Select all

convert in.tiff -quiet -quality NN out.miff
Is the documentation wrong? Is there a bug? Is my understanding wrong?
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: -quality and MIFF

Post by dlemstra »

You should also set the compression to zip
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -quality and MIFF

Post by snibgo »

Ah, yes, adding "-compress zip" means that varying "-quality NN" gives different sizes. Thanks.
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SOLVED: -quality and MIFF

Post by snibgo »

For anyone interested, TIFF works in the same way as MIFF: with "-compress zip", varying "-quality NN" gives different sizes. Perhaps someone could add to the documentation that what is said about MIFF here also applies to TIFF.
snibgo's IM pages: im.snibgo.com
Post Reply