ImageGear Professional DLL v17.1 for Windows Accusoft
Pixel Access Modes
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > User Guide > Using ImageGear > Images and Documents > Accessing Image Pixels > Pixel Access Modes

Glossary Item Box

Pixel access functions have two modes of operation: legacy (prior to ImageGear v14.5) and new (ImageGear v14.5 and newer). The default mode is legacy, in which these functions behave the same way they did before v14.5. So if you have existing code written for ImageGear v14.4 or earlier that uses pixel access functions, you shouldn't need to update it.

New pixel access mode provides more access to the new storage system. It lets you work directly with higher bit depths, advanced color spaces, and alpha/extra channel data included with the main channel data.

If you are migrating from legacy mode to new mode, you must be aware of the following differences between these modes:


Note that 1-bit pixels are the only pixels that are packed in the new mode - 8 pixels are stored in each byte. Pixels of any other channel depths are stored using 1, 2, or 4 bytes per channel. If a pixel has more than one channel and use 1 bit per channel, each of its channels will be stored in a separate byte. A channel value with depth of 2-8 bits will be stored in one byte, 9-16 bits in two bytes, and 17-32 bits in four bytes.

To use the new mode, you need to set the DIB.PIX_ACCESS_USE_LEGACY_MODE global control parameter to IG_PIX_ACCESS_MODE_NEW, as shown in the example below.

  Copy Code
AT_MODE pixAccessMode = IG_PIX_ACCESS_MODE_NEW;
IG_gctrl_item_set("DIB.PIX_ACCESS_USE_LEGACY_MODE", AM_TID_AT_MODE,
        &pixAccessMode, sizeof(pixAccessMode), NULL);

If pixel access mode is IG_PIX_ACCESS_MODE_LEGACY, and the image uses a pixel format not supported by the legacy mode, pixel access “…_get” functions convert image pixels into the closest available legacy supported format.  

©2012. Accusoft Corporation. All Rights Reserved.