[Digikam-users] slightly OT question: convert jpg->png

Milan Knížek knizek.confy at volny.cz
Wed Jan 13 19:09:29 GMT 2010


Daniel Bauer píše v St 13. 01. 2010 v 17:39 +0100:
> Hi,
> 
> when I convert jpgs's to png's in digikam with compression 5 they get approx. 
> half as big (in MBs) as if I convert them using 
> "convert xy.jpg -quality 50 -strip -verbose xy.png"
> 
> I thought "-quality 50" in imagemagick equals to "compression 5" in 
> digiKam/gimp, but obviously I'm wrong. Can somebody tell me how I can achieve 
> the same compression in imagemagick as in digiKam?

Did you try the various filter types? As per ImageMagick help:

For the MNG and PNG image formats, the quality value sets the zlib
compression level (quality / 10) and filter-type (quality % 10).
Compression levels range from 0 (fastest compression) to 100 (best but
slowest). For compression level 0, the Huffman-only strategy is used,
which is fastest but not necessarily the worst compression.

If filter-type is 4 or less, the specified filter-type is used for all
scanlines:

0: none
  1: sub
  2: up
  3: average
  4: Paeth

If filter-type is 5, adaptive filtering is used when quality is greater
than 50 and the image does not have a color map, otherwise no filtering
is used.

If filter-type is 6, adaptive filtering with
minimum-sum-of-absolute-values is used.


Regards,

Milan Knizek
knizek (dot) confy (at) volny (dot) cz
http://www.milan-knizek.net - About linux and photography (Czech
language only)




More information about the Digikam-users mailing list