Page 1 of 1

Simple (?) colour reduction problem

Posted: 2007-06-19T04:57:02-07:00
by harald
Hi,
I'm totally new to ImageMagick and the first thing I'm trying to do is to convert a photograph (JPG) to a Windows Bitmap for use on an old Win 3.11 computer. This computer can only handle 256 colours, so I also need to reduce the number of colours in the picture to get a good result (and a smaller file).

I think the best way to describe the problem is to tell you everything that I've tried so far. I started out with a fairly simple photo-editing program, ArcSoft PhotoStudio, that doesn't seem to have a colour reduction feature. The BMP file it makes takes ages to load on the old computer, and looks really bad.

The next step was to try out ImageMagick. From the command line, I used the following:

convert head.jpg -colors 256 head.bmp

But this file is unopenable by Windows Paintbrush in Windows 3.11. I used identify to compare the two files, and basically the only difference except the number of colours was the "class" type: "PseudoClass" files do not open in Win 3.11. Adding the option "-type TrueColor" enables this old version of Paint to be able to read the file. However, this option also causes the file to grow in size and it looks just as bad as the non-reduced file converted using PhotoStudio.

I'm sorry, I'm definitely not familiar with digital image editing, so if anyone could give me a hand I'd really appreciate it. Does the TrueColor option reverse the colour reduction somehow? "identify"ing the file does say that it only uses 256 colours though.

I don't know if this helps, but I had access to Paint Shop Pro for this task when I was still in school, and I remember that you could press CTRL+SHIFT+3 to reduce the number of colours to 256. This produced a file that worked perfectly with my old computer. Maybe IM has a feature similar to what PSP uses, I don't know.

Thanks for reading all of this. Hope you can help me..

Re: Simple (?) colour reduction problem

Posted: 2007-06-19T20:14:34-07:00
by anthony
This is the main problem with Window Image formats like BMP and TIFF
One program will read one type and an othe rprogram won't.

If posible use a more well defined standard like PNG JPEG and, dare I say it, GIF (sic). At leats they are so well defined knowone has real problems with them.

If you must use a BMP, try to get the BMP output correct for the program, which you already discovered.

You could also try...

Code: Select all

convert image bmp3:image.bmp
which produces the old (no transparency) BMP format.

See what notes I have in
http://www.imagemagick.org/Usage/formats/#bmp

Re: Simple (?) colour reduction problem

Posted: 2007-06-22T04:30:10-07:00
by harald
Thanks for those suggestions. I put in

Code: Select all

convert head.jpg -colors 256 bmp3:head.bmp
but the file still doesn't open in the old Windows Paintbrush. I prefer the BMP format because JPEG files slow down the old system significantly. Anyway, I found a better image viewer for Windows 3.x called ACDSee. Shareware, but does the job for now; it can read files with a colourmap. When the trial period runs out I always have the option of using the JPEG format.

I know this is off-topic, but if anyone knows of a free Win3.11-compatible image viewer I'd be very happy to hear about it.

Thanks again.