Welcome to Atalasoft Community Sign in | Join | Help

#1 in a very long list – ApplyPaletteCommand

Greetings, Campers.  A long time ago, in a galaxy far, far away, some very smart people decided to make things easy.  They developed a bunch of ImageCommands, which, though they did some pretty nifty things to images, were stab-your-eyes-out difficult to find in the documentation.  So, I’m introducing a new series – the DotImage ImageCommands.

First up, the ApplyPaletteCommand.  This command lets you map a colored image into a specific palette, resulting in an 8-bit, 256-color image.  It is available for DotImage Photo, Photo Pro, and Document Imaging.

Properties to consider:

  1. Palette – you can specify the colors you want the image mapped to with a new Palette.
  2. Dithering Mode – this is the algorithm used to colormap.  Options include None, TwoValue, or FloydSteinberg
  3. Dither Error – the amount of dithering to apply.  Should be between 0 and 127.

Here are the results, using the Standard Windows 16-color palette, FloydSteinberg, and 64:

Before (image’s pixel format is 24 bpp BGR):

image

After (image’s pixel format is 8 bpp indexed):

applypalettecommand_rose 

Tomorrow, the AutoCropCommand.

Published Wednesday, July 01, 2009 4:05 PM by Elaine

Comments

No Comments
Anonymous comments are disabled