Page 1 of 1

Convert bmp to jpeg

Posted: 2009-06-09T00:07:48-07:00
by Pravin
Hi, I am new at ImageMagicK.
I am trying to convert bmp file to jpeg using command line utility.
I am using following commnad for the same.
convert "test.bmp" -resize 1024x768 -density 72 -depth 24 -Quality 72 "test.jpeg"

It results in test.jpeg but in complete black color.

Here are the details of test.bmp
Width: 1280 pixels
height: 1024 pixels
Horizontal resolution: 96 dpi
Vertical resolution: 96 dpi
Bit depth: 32
Frame count: 1

If I removed the "resize" option or provide with exactly same as bmp then it works fine.

Please let me know what is wrong in this conversion?

Thanks.

Re: Convert bmp to jpeg

Posted: 2009-06-09T00:18:44-07:00
by Bonzo
I would say you have a conflict of options and would start with the basics and expand to see where the problem is.

Code: Select all

convert test.bmp -resize 1024x768 test.jpeg

Re: Convert bmp to jpeg

Posted: 2009-06-09T09:36:09-07:00
by fmw42
what version of IM

convert -list configure

report what version and what quantum-depth

Note depth is the depth per channel. I don't think 24 is supported. If you are using IM quantum depth 8, your only choice is 8, or 1 (binary). If quantum depth 16, then 16, 8, 1. If quantum-depth 32, then 32, 16, 8 or 1.

IM folks can correct me if I am wrong.

Re: Convert bmp to jpeg

Posted: 2009-06-09T22:42:50-07:00
by Pravin
Hi,

I have tried the only resize option. It is not working.

convert test.bmp -resize 1024x768 test.jpeg.

It works with other options.
convert "test.bmp" -density 72 -depth 24 -quality 72 "test.jpeg"

so I think issue is with resize option.

I am using IM 6.5.3.
Operating System: WindowsXp

Thanks.

Re: Convert bmp to jpeg

Posted: 2009-06-10T09:48:03-07:00
by fmw42
post your bmp image so others can test/check it.

I am no expert of bmp images, but read http://www.imagemagick.org/Usage/formats/#bmp