[magick-users] Dither 24bit images to 16bit (aka truecolor to hicolor)

Anthony Thyssen anthony at griffith.edu.au
Wed Dec 5 18:11:55 PST 2007


jore at stachelig.de on  wrote...
| Hello all,
| I use an old LCD screen with proprietary graphics card as a digital
| picture frame. Unfortunately the graphics card only allows "hicolor" mode
| (16 bit/pixel) at full resolution due to it's limited vram.
| Thus some images, especially those with smooth gradients (like blue skies
| etc.) show a quite noticeable banding. My idea is now to dither (error
| diffusion or whatever) the 24bits/pixel images to 16bits/pixel for
| displaying them; this shouldn't be too big a problem I guess.
| Is it possible to do this with ImageMagick, or do I have to code this
| myself? I would only do the conversion with IM btw, for displaying the
| images I have a small self-written app that mixes images from certain
| sources.
| 
16bit/pixel is a special color mapping knonw as 556 color map
that is 5bits of red, and green and 6 bits for blue.
Check an make sure that is the case.

IM can do ordered dithering of that type directly

   -ordered-dither o8x8,5,5,6

Or you can create a 556 colormap and use a E-dither using the -map
command.

Both dither types (for a 332 color map) are shown on
   http://imagemagick.org/Usage/quantize/

Do not however save the image as JPEG as it will chnage the colros
slightly, use PNG instead to feed you display program.


  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
    ``"Set a new course. There's coffee in that nebula.''
                          Captain Janeway -- Startrek Voyager, ``The Cloud''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list