This contains no date, or time or statistics or anything but pure image data and size in an extremely simple format - thereby allowing comparison of whether pixel values have changed through compression. In order to test whether you have lossless compression, I would suggest you convert images to PPM format - see here. It contains a readily compressible block of solid colour (red), a black-white gradient and a bunch of noise, so there is something to make most types of compression happy or unhappy in there. I don't have access to your images, so I generated a reference image myself, as follows. I think you are at, or beyond, the limits of the ImageMagick documentation and would like to suggest you work out your answer empirically - or if you do get a definitive answer, that you at least test it empirically. Any idea how to achieve better lossless compression?.Is this lossless compression? If not, where is the mistake?.It might be that compression-filter of 9 and compression-strategy of 0 are producing smaller size images, but I am still not sure if it is lossless or not). (If I use default compression strategy 0, I get large files. If you are using an old zlib that does not support Z_RLE (before 1.2.0) or Z_FIXED (before 1.2.2.2), values 3 and 4, respectively, will use the zlib default strategy instead." compression strategy is 2 huffman_only (so no filtering, although this compression filter shall be lossless)Īccording to the documentation: "valid values are 0 through 4, meaning default, filtered, huffman_only, rle, and fixed ZLIB compression strategy.define png:compression-level=9 -define png:compression-strategy=2 These are current arguments I'm playing with: convert -depth 24 -define png:compression-filter=1 \ I tried a few things, but it looks to me like the resulting PNG image is not as sharp as original image, although my wife cannot see it. I'd like to achieve a maximum amount of compression when saving to a lossless PNG using ImageMagick.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |