Archived

This topic is now archived and is closed to further replies.

GameCreator

Photoshop gradient banding question

Recommended Posts

GameCreator    997
I noticed recently that whenever I use a Clouds Filter or a Gradient that though the picture looks fine in Photoshop, if I save it to any file type it has clear banding and is not a smooth transition between colors. I''ve helped fix this problem a little by using Noise but what if I would like a pure Gradient or Clouds without banding? Does anyone know how to fix this problem? Thanks.

Share this post


Link to post
Share on other sites
gmcbay    130
What format are you saving to? GIF? JPG? Other?

You shouldn''t get banding on the image if you save to a 24 bit color format with no lossy compression (PNG, BMP are two common ones)... With GIF, you''ve only got 8 bit color so you''ll always get banding when you try to save/convert an 24 bit image...With JPG, you''ll get some banding depending upon the compression ratio used.

Share this post


Link to post
Share on other sites
GameCreator    997
Any file type. I have tried BMPs, PSDs and others. I do know the difference between color counts and compressions in each file type. I do expect banding in GIF files (for those that are larger in resolution) and some in JPGs depending on compression, as you said. Still, for uncompressed, high color files like BMPs, banding should not be an issue, yet it is. If it helps, I''ll post comparison pictures.

But just to illustrate my point, try to make a simple 5 inch by 5 inch document in Photoshop. Create a gradient of black to white across it. Now save the file as a BMP. Compare the two. Do you see a difference? There should be none if you used and saved in high color. For me, there is. Why?

Share this post


Link to post
Share on other sites
Zonbie    122
Gradient huh?
ok, just to go back a minute, whats you desktop colour depth set to? Is it set to 16bit colour or 32bit colour?

If it's set to 16bpp, then your RGB setting is prehaps 565, meaning 5 bits to red, 6 bits to green and 5 bits to blue. This is not enough variance to do a gradiant without banding.

Incidentally, PhotoShop dithers 16bit images, so the image in PhotShop will look better, like it doesn't really have banding. But as soon as you move to another application and open your image there, your 16bpp image will not dither, and your'll have banding on your gradient.

16bpp, btw, is 16 bits-per-pixel. to do gradients properly, you should save image as 24bpp (RGB=888) and your display properties for Windows should be either 24bpp or 32bpp.

If windows is displaying 24/32bit colour then you will not see banding.

Incidentally, banding is always reduced automatically in green, the human eye is more aware to this colour, so if these is banding you won't see as much as against blue and red. (you can try it if you like )

btw, 32bit colour has the same colour depth as 24bit colour. This is because 24bit is RGB(888) whereas 32bit colour is RGBA(8888) the A is Alpha, used often for masking, and does not improve the colour depth.

Btw, dithering is a technique for producing more colour then actually possible to display by mixing and blending the colours available in the pattern, reducing banding and other artifacts.

Hope this helps.

www.stephen-hawes.co.uk


Edited by - Zonbie on January 31, 2002 6:37:09 PM

Share this post


Link to post
Share on other sites
GameCreator    997
My display settings are 1024x768 with 16 bit color but that isn''t relevant here, I believe. In that setting I can see two different types of gradients (banded and not banded). If my color setting wouldn''t allow nice gradients then I wouldn''t see one in Photoshop, despite that it saves crappy gradients.

If I understand what Zonbie is saying, Photoshop basically cheats and gives you the illusion that your picture looks fine. But when it saves your file it doesn''t save quite what it shows you.

That sucks.

Also, I used Paint Shop Pro to grab the Photoshop screen and then saved it. Guess what? The gradient was "normal." It''s gonna suck to have to save like this from now on.

Share this post


Link to post
Share on other sites
Zonbie    122
GameCreator,
>>>My display settings are 1024x768 with 16 bit color but that isn't relevant here, I believe. In that setting I can see two different types of gradients (banded and not banded). If my color setting wouldn't allow nice gradients then I wouldn't see one in Photoshop, despite that it saves crappy gradients<<<

Yes you would. 16bpp is RGB(565) it isn't precise enough to give you a smooth gradient. End of.

To give you an idea the palette size for 16bit colour is 65000 colours. 24bit colour is 16.7 million colours in the palette.

You might think - 65000? I only need <2000 to do my gradient, so why won't it work? Because of a lack of precision.
RGB=565 for 16bit colour without an alpha channle, for example. that's 5bit precision for any varient of blue. it's a long way off 24bit colour, which can give more varients, thus a smoother transition from one shade to the next. This is why banding occurs. The data is there, the bit prescision of the colour depth you are displaying isn't.

your gradient is on screen looking fine.
you save the file as a .BMP (24bpp) The file saves with 24bpp.

This means that the data file will save the palette at 24bit precision.

So. PhotoShop has a 24bit image to render in a 16bit display. The image will lose colours from the data. It dithers the image to give the illusion that the colours are present.

You load the same image into PaintShop Pro. It too has to display a 24bit image on a 16bit display. Guess what? Thats right! You end up with nearest colours being the same as other colours, because the bit precison the display can show cannot get those other varients. How on earth can a 565 RGB setting display 888 RGB information pinpoint perfectly without some loss? It can't.

The only reason PhotoShop looks like it can, is becuase PhotoShop dithers the image, the bit precision that cannot recreate a shade of blue between lines, it dithers. But it cannot save dithering...it's a function. It's an instruction. And yes, it's inferior, you can see the difference between a dithered 16bit gradiant, and a 24bit gradient.

(dithering means that you take 1 colour and another and stipple, or pattern the pixels to create a new shade...a bit like crosshatching with a pen on paper to give illusion of shade with 1 color)

If you want to see a 24bit image as intended you must display 24bit on your system. Why aren't you running at 24 or 32bit colour btw?

Set your monitor to 8bit, and see what happens. The same problem 232 RGB is hopeless at recreating an 888 RGB image, and it shows.

If you save a picture and posted it up on this forum, everyone running a 32bpp display won't see banding! The display setting matters. If someone was running in 4bit colour mode (16colours) they would see an even worse image.

I hope this helps.

www.stephen-hawes.co.uk


Edited by - Zonbie on February 1, 2002 1:57:31 PM

Share this post


Link to post
Share on other sites
merlin9x9    174
You will see banding no matter what your color depth is. Even at 24 or 32 bit, you only get 8 bits per channel. That means 256 different shades per channel. If you have, say, a horizontal gradient wider than 256 pixels), you will see banding because you only have 256 shades to fill an area larger than 256 pixels—there's simply not enough color precision. Of course, this is particularly a problem when the source and destination colors are similar in hue, but the potential is always there. Everyone who's said there would be no banding is obviously full of hot air because if there weren't, nobody would bother to make devices with higher-precision frame buffers...

...which have existed for quite some time in SGI workstations, and—if John Carmack is right—will come to the PC...

...hopefully we'll start seeing floating-point frame buffers (of at least 16 bits per channel, but preferably 32) within the next few years, but that means that Adobe will have to modify Photoshop to store color components in floating-point rather than bytes. If you ask me, they should have had support for floating-point color channels (usually represented as a range of 0.0 to 1.0) for years.

It'd also be nice to see digital sound devices using floating-point as well.


Edited by - merlin9x9 on February 1, 2002 2:16:46 PM

Share this post


Link to post
Share on other sites