Palette Handling - Image Processing with LEADTOOLS

Introduction: Color Palette and Color Palette Handling

Any image that is 8 bits per pixel or less must have a palette. The palette is an array that contains the colors for displaying the image. The pixel values are indexes into the array. An image can have its own unique palette or it can share a common fixed palette. In either case, every bitmap in memory that is 8 bits per pixel or less has its own copy of a palette (even if it is a common fixed palette).

One way for a bitmap to have a unique palette is to load an image from a file that is 8 bits per pixel or less. In that case, the file contains a palette for the image, and you can assume that the palette is unique. By default, LEADTOOLS loads the palette that is stored in the file and associates it with the bitmap in memory.

Another way for a bitmap to get a unique palette is to create the palette. For example, if you reduce a 24-bit image to 8 bits per pixel, you can let LEADTOOLS create an optimized palette for the image.

By using a unique, optimized palette, you get the best possible image quality, but there is a drawback. When a display device uses a palette (for example, when it is in 256-color mode), it can only use one palette at a time to display colors. Therefore, if you are displaying more than one image at the same time, the current image may look perfect, while all of the others look bad, because they are mapped to the wrong palette. This is called palette shift.

Using a fixed palette solves these palette-shift problems. The best approach is to specify the fixed palette as a display option. Then, LEADTOOLS remaps each image to the fixed palette when it is displayed, without disturbing the individual image's palette. (When displaying 16-, 24-, or 32-bit images on a device with 256 colors or less, LEADTOOLS always uses the fixed palette.)

Alternatively, you can use a color resolution function to specify a fixed palette for each individual image. But then, when you save the image to a file, the fixed palette is saved in the file, and any unique palette information is lost.

LEADTOOLS SDKs allow developers to add extensive color palette support to their applications quickly and easily. LEADTOOLS includes functions with many options that give you the flexibility to make your images look as good as possible. Whether you are working with medical images, scanned documents or digital photographs, LEADTOOLS can help you display your images optimally.



imaging component evaluations and demos - Color palette handling tools


RELATED IMAGE PROCESSING PROGRAMMING INFORMATION

[Image Processing Transforms] [Image Processing Image Filters] [Image Processing Color Conversions]
[Image Processing and Drawing] [Image Processing Region of Interest]

   
 

third party components[Complete Line of Imaging Developer SDKs]third party controls [General Imaging Component Information]imaging components

[Raster Imaging Components] [Document Imaging Components] [Multimedia Imaging Components]

[Vector Imaging Components] [Medical Imaging Components]


[A REPORT ON ROI OF COMPONENT USE]

.NET Components
ActiveX Interface
Class Library Controls
COM Components
DLL Components
VCL Components
ActiveX Image Component
ActiveX Imaging Component

Programming-Interfaces
 
Programming-SDK
 

.NET Programming
C/C++ Programming
Delphi Programming
Video SDK
Video Conferencing Toolkit
Audio Video Conferencing
Audio Video Stream
Annotation VB
Annotation .NET

Programming-Languages
 

Document Clean-up
Image Compression
Image Processing Components
Imaging Components Benefits
Best Compression Options
File Format Components
Image Annotations
OCR / ICR / OMR
Audio Compression

Imaging-Components.com
 
       
About PDF Conversion

imaging components, compression components, software development tools, programming tools, controls, third-party controls

handling palettes and palette shift: color palette: color palette handling: colors
Imaging Components - Color palette and palette handling

 

Imaging component