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.
Convert bmp to jpeg
Re: Convert bmp to jpeg
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert bmp to jpeg
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.
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
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.
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert bmp to jpeg
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
I am no expert of bmp images, but read http://www.imagemagick.org/Usage/formats/#bmp