How to save a JPG in 256 colors?

J
Posted By
jamewoong
Mar 14, 2008
Views
1788
Replies
16
Status
Closed
I’m using Photoshop CS2.

1. How to save a JPG in 256 colors?

2. Is there a way to see an image properties?
— I want to know if that image is in 256 color or not…

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

MD
Michael_D_Sullivan
Mar 15, 2008
JPEGs do not have a 256 color mode. Moreover, converting a file in some manner to 256 colors and then saving to JPEG won’t result in a 256 color file. You need to use GIF, which has 256 colors as its ceiling. Use File > Save for Web [and Devices, if CS3].
P
Phosphor
Mar 15, 2008
I don’t know why you want to do this, but you could open it in IrfanView and Go to Image>Decrease Color Depth and bring it down to 256.
DM
Don_McCahill
Mar 17, 2008
To save a jpg in 256 colors. 1) change the color mode to indexed, 2) change the mode back to RGB. Step one will limit the colors to 256.

I don’t know of any way to track the number of colors in an image. Perhaps something in the histogram.
GH
Gernot_Hoffmann
Mar 17, 2008
Don, Michael is right – JPEG doesn’t
retain the number of different colors
in an image. A test, using my own image
processing system which can count the
number of colors, for 1.000.000 pixels
(1 million):
Original 640.000 colors (number rounded)
Indexed 256 colors
JPEG 188.000 colors (number rounded)

The JPEG looks like the Indexed Color
image, but the number of colors is much
larger. This happens because of several
processes: color subsampling, forward
and reverse quantization, as described
here:
<http://www.fho-emden.de/~hoffmann/jpeg131200.pdf>

Best regards –Gernot Hoffmann
DM
Don_McCahill
Mar 17, 2008
Right Gernot. I had assumed that cutting the colors down to 256 would be maintained through the file creation, but thinking about it, of course the colors would shift in the compression stages.
JJ
John_Joslin
Mar 17, 2008
I wonder why he asked.
I
ID._Awe
Mar 17, 2008
Some people have the mistaken notion that a jpg is always larger than a gif file, but jpg have a better quality than gifs, so he was no doubt thinking that he could get jpg quality but the gif size.
J
jamewoong
Mar 18, 2008
Ed Hannigan, your method works great, but I’ll have to use a third party program. PhotoShop is the king of all graphic editor. If a such simple program can handle that, I think PS will also be able to do it.

Don McCahill, your method work, but it’s not better than Ed Hannigan’s method. Indexing a picture will destroy all the quality of an image. When I tried to decrease the color depth with IrfanView, the picture seem to be the same. But when trying to index it with PhotoShop, lot of color are lost. Also, I’ll have to make few step in other to save it as JPG 256 colors.

ID. Awe, you got my point.

I don’t like to use gif. I only use it if it’s a motion picture. I stil prefer the classical type.

Look at this, it’s the same image:
JPG=4 KB
<http://www.siriusweb.com/ZDU/pkorg.jpg>

GIF=22 KB
<http://www.siriusweb.com/ZDU/pkorg.gif>

Source:
<http://www.siriusweb.com/tutorials/gifvsjpg/>

We can see that GIF is not always the best choice…
MJ
Mary_Jo_Scott
Mar 18, 2008
I am new to Adobe forums and have what is probably a newbie question. When I transfer photos that were taken at 8M to my computer, the photos’ size now reads as approximately 3M. Why do they not remain at the size taken or am I missing the whole idea? I want to print out large poster size images. I hope you understand my question and can help.

Thanks!
Mjay
TH
Trez_Hane
Mar 18, 2008
Mjay, you have posted your question to an existing thread that has nothing to do with your question. You need to start a new topic. Having said that, I strongly suspect you are confusing megapixels and megabytes, two different animals. Also, if your photos are saved as jpeg files, they are compressed in file size until opened in a program.

If you find this confusing, repost your question with more information. Also, be sure you are in the right forum. This is for Photoshop. If you are using Photoshop Elements, there is a different forum for that.

Regards,
Trez
MD
Michael_D_Sullivan
Mar 18, 2008
Mary Jo, since you are a newcomer, you may not yet understand that in any given Adobe forum, there are a whole bunch of conversations going on at the same time. Each one of these is about a certain "topic", described in the title and opening post. The discussion sometimes stays right on point, and sometimes veers off a bit, and there are often quick side-issues branching off from the main topic, but still related. Within limits, people here try to keep the discussion on a single general topic. For example, in this topic, the initial issue is whether there is a way, in Photoshop, to limit the number of colors in a JPEG image to 256; there were discussions about whether this could be done or not, and alternative programs that may be able to accomplish this, and a comparison of the file sizes for 256 bit images in different file types.

Your question, however, is not a logical outgrowth of the discussion. It’s a perfectly good question, but it deserves its own new discussion topic. It’s like a bunch of people have been sitting around a table discussing the merits of Canon vs. Nikon SLRs, and someone sits down at the table and, instead of joining the conversation, asks a completely unrelated question about point-and-shoot cameras, or camcorders.

It’s off-topic here, and you should start a new topic. Make the title descriptive, such as "Why does a 8 megapixel image result in a 3 megabyte file on my computer?" (assuming that’s what you want to ask — just "M" doesn’t tell me whether you are talking about MP or MB). In the initial post, provide a more detailed description of what you want to know. Tell us what camera and Photoshop version you are using, and how you encountered the issue. People will see that a new topic raises an issue they know something about and you will get a response — probably a good answer, if you keep in the conversation.

[Edit: Trez hit "post" before I did. Trez– I think she is using Photoshop, not Elements; she did say CS2.]
TH
Trez_Hane
Mar 18, 2008
Michael, I must be missing something, perhaps because I use NNTP access. I don’t see any reference to CS2. But then again, it’s getting late & neither my eyes nor brain are real sharp at the moment…
MD
Michael_D_Sullivan
Mar 18, 2008
Whoops. The OP is using CS2; Mary Jo doesn’t say. Another good reason not to post off-topic.
I
ID._Awe
Mar 18, 2008
james: just use ‘Save for Web’, choose the four-up and then you can monitor the size/quality of the final file before saving. Then you can save the settings you like and use them again for other files if you wish.
DM
Don_McCahill
Mar 18, 2008
Don McCahill, your method work, but it’s not better than Ed Hannigan’s method. Indexing a picture will destroy all the quality of an image.

You missed Gernot’s message following mine. While indexing cuts down to 256 color (which will lower the quality of the image) you have a photo that is 256 colors in Photoshop. But when you save that image as jpg, the jpg algorithms will result in more than 256 colors.

The question remains, why do you need/want 256 colors in a jpg?
I
ID._Awe
Mar 18, 2008
Don: I answered that in post #7, he just has to learn now to use SFW more effectively.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections