Page 1 of 1

newbie question - converting to different color depth

Posted: 2007-07-05T17:55:13-07:00
by graymon
I am trying to convert an image to a 16 bit color depth, and I can't seem to figure it out. The image that I'm starting with is a jpg.

convert -depth 6 image.jpg image.bmp

but every time, the bmp is TrueColor, and 24 bits. I want to make the bmp for a 16 bit LCD, but I can't seem to figure out the convert program. Anyone would could offer a tip, I'd greatly appreciate it.


Info from the identify:

jpg info:
Image: image.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 755x1200
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Channel statistics:
Red:
Min: 0 (0)
Max: 255 (1)
Mean: 221.573 (0.868915)
Standard deviation: 57.8563 (0.226887)
Green:
Min: 0 (0)
Max: 255 (1)
Mean: 220.679 (0.865407)
Standard deviation: 53.5961 (0.210181)
Blue:
Min: 0 (0)
Max: 255 (1)
Mean: 184.951 (0.725297)
Standard deviation: 93.7735 (0.367739)



bmp info:
Image: image.bmp
Format: BMP (Microsoft Windows bitmap image)
Class: DirectClass
Geometry: 755x1200
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Channel statistics:
Red:
Min: 0 (0)
Max: 255 (1)
Mean: 221.573 (0.868915)
Standard deviation: 57.8563 (0.226887)
Green:
Min: 0 (0)
Max: 255 (1)
Mean: 220.679 (0.865407)
Standard deviation: 53.5961 (0.210181)
Blue:
Min: 0 (0)
Max: 255 (1)
Mean: 184.951 (0.725297)
Standard deviation: 93.7735 (0.367739)

Re: newbie question - converting to different color depth

Posted: 2007-07-05T18:48:03-07:00
by anthony
try using BMP2 and BMP3 file formats. One of these may do the job.

Code: Select all

convert   ....   BMP3:image.bmp

Re: newbie question - converting to different color depth

Posted: 2007-07-05T19:26:09-07:00
by graymon
They don't seem to change the color depth. Tried BMP2 and BMP3. Even converting them to a PNG8 (which reduced it to 8 bit color) then to a bmp brings it back to 32 bit color. The closest I got was

convert -colors 256 image.jpg BMP2:image.bmp
===> 8 bit color


convert -colors 257 image.jpg BMP2:image.bmp
====> 24 bit color


I'm not sure what 16 bit color is (color per pixel, channel) but I can't seem to figure this out. I've tried about 300 combinations by now :)

Re: newbie question - converting to different color depth

Posted: 2007-07-05T21:23:49-07:00
by anthony
It may be a unsupported format. It may need to be reported as a request on the bugs forum. A link to an example 16bit BMP image may also help get it done faster.

By 16 do you mean 16 bits per RGB color, using some psuedo-color method,
or 16 bits per color value? Be clear.

From my notes...
ImageMagick supports 8, 24, and 32-bit BMP images.

EG: 8bit palette, and 8bit per value, RGB or RGBA

Re: newbie question - converting to different color depth

Posted: 2007-07-06T06:17:59-07:00
by graymon
This was the color depth I was looking for. This description was from wikipedia. I'm looking for an example file for this color depth.

16-bit color uses 5 bits to represent red, 5 bits to represent blue, but (since the human eye is more sensitive to the color green) uses 6 bits to represent 64 levels of green. These can therefore be combined to give 65,536 (32 × 64 × 32) mixed colors. Sixteen-bit color is referred to as "thousands of colors" on Macintosh systems.

Re: newbie question - converting to different color depth

Posted: 2007-07-08T23:29:44-07:00
by anthony
I don't think that is implemented in IM. You could request it (with a link to an image example that is using it) but I think that is all. I don't think even the NetPBM BMP converter can do this.