Page 1 of 1

Converting BMP to fixed size JPEG

Posted: 2010-03-24T02:58:12-07:00
by Thamior
Hello. I need to convert BMP files to JPEG which are less or equal 64 Kbyte in size. It could be achieved using different methods, such as turning image to grayscale, setting lower resolution and setting lower quality when convert the image. I haven't found how to lower quality of JPEG. Also what would you suggest in this situation?

Re: Converting BMP to fixed size JPEG

Posted: 2010-03-24T06:22:10-07:00
by snibgo

Code: Select all

convert in.bmp -quality 50 out.jpg
I don't think IM has an automated facility to choose the highest quality with a cap on the resulting filesize. You would have to do that in a script.

Personally, I would reduce the "quality" number until either I reached the 64KB limit or quality became unacceptable. Only then, if necessary, would I reduce resolution. You might prefer the opposite.

Re: Converting BMP to fixed size JPEG

Posted: 2010-03-24T09:23:35-07:00
by fmw42
I have a unix bash script, downsize, that changes the image dimensions to get to a desired filesize. It does not adjust quality/compression. see link below