NOTE: I'm a systems administrator, not a graphic designer, so I'm a total n00b when it comes to image manipulation.

That being said, I thought this would be the best forum to ask this question:
I am setting up a terminal server farm where the desktop shows our corporate branded background image. The problem is that the RDP session is limited to 16-bit color, and it creates a visible and annoying vignette pattern in the image which looks unprofessional.

Is there any way to downsample the image to a 16-bit color palette and use dithering to reduce the color banding in the image?

I'd rather use GIMP since it's free but I can borrow a computer with Photoshop in it if I have to.


I cross-posted this question on Server Fault and got the following information:

"5/6/5 has always been how Windows has handled 16-bit video modes (at least, in my memory) so I'd be inclined to grab a Photoshop filter that dithers to 5/6/5 format and tweak from there."

Is there such a filter in Photoshop that I can use?

  • 1
    Can you do a GIF? will it be acceptable for the farm? – Vnovak Jun 20 '14 at 18:39
  • GIF does let you create a custom 256-color palette, and since the image is actually pretty monochromatic, it still looks good on a 32-bit color space. The problem is that the custom colors on the palette are still outside the 16-bit color space, so the banding remains. I need to find a way to adjust the palette so that all the colors can be represented by a 16-bit graphics mode. – Wes Sayeed Jun 20 '14 at 18:44
  • Will think how to narrow down the gamut and let you know. – Vnovak Jun 20 '14 at 21:13

Is there any way to downsample the image to a 16-bit color palette and use dithering to reduce the color banding in the image?

Yes. Use Photoshop's "Indexed" mode. When you choose this option, you can pick the colors to use as well as whether or not to dither it (you want to dither it).

enter image description here

Image credit + more details: http://www.mediacollege.com/graphics/01/options-gif.html

| improve this answer | |
  • Yes, GIMP has this feature too (not sure if it differs significantly from Photoshop's), but the some of 256 colors it chooses for the palette still fall outside a 16-bit color space. – Wes Sayeed Jun 20 '14 at 18:53
  • It is even funny that Photoshop allows to do 8b or 24b image.. and ignore 16b – Vnovak Jun 20 '14 at 18:56
  • @WesSayeed you need to pick the colors you want to use. Under 'FORCED' pick 'CUSTOM...' and then LOAD to load your particular color pallet. – DA01 Jun 20 '14 at 19:03

I found the solution on this Adobe community forum. Not exactly what I was looking for but it looks good just the same.

Basically, I added noise to the picture so that the bands are less obvious when I indexed it to a 256-color palette. It's practically indistinguishable from the original now (although the company logo lost a bit of sharpness).

| improve this answer | |

Another approach to this that's similar in principle to the one DA01 pointed out, but possibly a bit easier to control and work with:

In Photoshop, apply Layer > New Adjustment Layer > Posterize and adjust the slider. The 256 color option gives the smoothest rendering and is ready for 8-bit png or gif after you've added a little noise to smooth out visible banding.

To add the noise add a new layer (Layer > New Layer) filled with 50% grey and set to Overlay blend mode. Use Uniform noise, set to Monochromatic and an amount of 2% or so.

Then File > Save for Web and choose 8-bit png or gif at 256 colors.

| improve this answer | |

If GIMP cannot do it, you could use ImageMagick:

# First ensure the package is installed:
sudo apt-get install imagemagick
# or
sudo pacman -Sy imagemagick

convert input.png -dither FloydSteinberg -colors 65536 -depth 16 output.png

If you don't want dithering, replace -dither FloydSteinberg with +dither to disable it.

For some reason, when working with PNGs you need to provide all of those arguments, otherwise the image depth is not actually reduced. (A GIF output does not suffer from this issue.)

Imagemagick documentation here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.