Page 1 of 1
Re: Batch Convert BMP to png without compression
Posted: 2006-11-08T18:45:07-07:00
by glennrp
Plisgyn wrote:
I am trying to convert a directory of BMP files to png without compression using mogrify.
All the files are converted o/k but are compressed I am using version 6.2.9.3 and
mogrify - format png -compress none *.BMP. Any help appreciated.
There's no uncompressed PNG format. PNG compression is always lossless unless you deliberately reduce the number of colors.
Posted: 2006-11-09T05:36:49-07:00
by glennrp
Plisgyn wrote:
I found out why I was confused about convert I somehow managed to change bmp to png
files with the same file size. My program which wouldn't read bmp files now read them o/k
, I now realise that I somehow must have just changed the file type from bmp to png and
not reformatted the file. I now rephrase the question how can you change the compression
ratio when converting to png?.
Use the -quality option. The parameter for this option has two digits.
The first digit is the "deflate" level, 1 being the fastest and 9 giving
the highest compression. The second digit is the PNG filter. Good
choices are -quality 90 for drawings and -quality 95 for photos. For
high compression speed, use 20. Regardless of the quality setting,
you will get identical images.