- Main Page
- Modules
- Classes
- Files

# Attributes

## Functions

int32_t | CxImage::GetSize ()
uint8_t * | CxImage::GetBits (uint32_t row=0)
uint8_t | CxImage::GetColorType ()
void * | CxImage::GetDIB () const
uint32_t | CxImage::GetHeight () const
uint32_t | CxImage::GetWidth () const
uint32_t | CxImage::GetEffWidth () const
uint32_t | CxImage::GetNumColors () const
uint16_t | CxImage::GetBpp () const
uint32_t | CxImage::GetType () const
const char * | CxImage::GetLastError ()
static const TCHAR * | CxImage::GetVersion ()
static const float | CxImage::GetVersionNumber ()
uint32_t | CxImage::GetFrameDelay () const
void | CxImage::SetFrameDelay (uint32_t d)
void | CxImage::GetOffset (int32_t *x, int32_t *y)
void | CxImage::SetOffset (int32_t x, int32_t y)
uint8_t | CxImage::GetJpegQuality () const
void | CxImage::SetJpegQuality (uint8_t q)
float | CxImage::GetJpegQualityF () const
void | CxImage::SetJpegQualityF (float q)
uint8_t | CxImage::GetJpegScale () const
void | CxImage::SetJpegScale (uint8_t q)
EXIFINFO * | CxImage::GetExifInfo ()
bool | CxImage::GetExifThumbnail (const TCHAR *filename, const TCHAR *outname, int32_t imageType)
bool | CxImage::RotateExif (int32_t orientation=0)
int32_t | CxImage::GetXDPI () const
int32_t | CxImage::GetYDPI () const
void | CxImage::SetXDPI (int32_t dpi)
void | CxImage::SetYDPI (int32_t dpi)
uint32_t | CxImage::GetClrImportant () const
void | CxImage::SetClrImportant (uint32_t ncolors=0)
int32_t | CxImage::GetProgress () const
int32_t | CxImage::GetEscape () const
void | CxImage::SetProgress (int32_t p)
void | CxImage::SetEscape (int32_t i)
int32_t | CxImage::GetTransIndex () const
RGBQUAD | CxImage::GetTransColor ()
void | CxImage::SetTransIndex (int32_t idx)
void | CxImage::SetTransColor (RGBQUAD rgb)
bool | CxImage::IsTransparent () const
uint32_t | CxImage::GetCodecOption (uint32_t imagetype=0)
bool | CxImage::SetCodecOption (uint32_t opt, uint32_t imagetype=0)
uint32_t | CxImage::GetFlags () const
void | CxImage::SetFlags (uint32_t flags, bool bLockReservedFlags=true)
uint8_t | CxImage::GetDisposalMethod () const
void | CxImage::SetDisposalMethod (uint8_t dm)
bool | CxImage::SetType (uint32_t type)
static uint32_t | CxImage::GetNumTypes ()
static uint32_t | CxImage::GetTypeIdFromName (const TCHAR *ext)
static uint32_t | CxImage::GetTypeIdFromIndex (const uint32_t index)
static uint32_t | CxImage::GetTypeIndexFromId (const uint32_t id)
bool | CxImage::GetRetreiveAllFrames () const
void | CxImage::SetRetreiveAllFrames (bool flag)
CxImage * | CxImage::GetFrame (int32_t nFrame) const
bool | CxImage::IsValid () const
bool | CxImage::IsEnabled () const
void | CxImage::Enable (bool enable=true)
int32_t | CxImage::GetNumFrames () const
int32_t | CxImage::GetFrame () const
void | CxImage::SetFrame (int32_t nFrame)

## Detailed Description

## Function Documentation

void CxImage::Enable | ( | bool | enable = `true` | ) | `[inherited]`

Enables/disables the image.

uint8_t * CxImage::GetBits | ( | uint32_t | row = `0` | ) | `[inherited]`

Returns:
  pointer to the image pixels. USE CAREFULLY

uint16_t CxImage::GetBpp | ( |  | ) | const`[inherited]`

Returns:
  : 1, 4, 8, 24.

uint32_t CxImage::GetClrImportant | ( |  | ) | const`[inherited]`

See also:
  SetClrImportant

uint32_t CxImage::GetCodecOption | ( | uint32_t | imagetype = `0` | ) | `[inherited]`

See also:
  SetCodecOption

uint8_t CxImage::GetColorType | ( |  | ) | `[inherited]`

Returns:
  1 = indexed, 2 = RGB, 4 = RGBA

void * CxImage::GetDIB | ( |  | ) | const`[inherited]`

Returns:
  internal hDib object..

uint8_t CxImage::GetDisposalMethod | ( |  | ) | const`[inherited]`

Gets the method for drawing the frame related to others Values : 0 - No disposal specified. The decoder is not required to take any action. 1 - Do not dispose. The graphic is to be left in place. 2 - Restore to background color. The area used by the graphic must be restored to the background color. 3 - Restore to previous. The decoder is required to restore the area overwritten by the graphic with what was there prior to rendering the graphic. 4-7 - To be defined.

uint32_t CxImage::GetEffWidth | ( |  | ) | const`[inherited]`

Returns:
  uint32_t aligned width of the image.

int32_t CxImage::GetEscape | ( |  | ) | const`[inherited]`

Returns:
  the escape code.

See also:
  SetEscape

EXIFINFO* CxImage::GetExifInfo | ( |  | ) | `[inline, inherited]`

bool CxImage::GetExifThumbnail | ( | const TCHAR * | filename,
|  | const TCHAR * | outname,
|  | int32_t | imageType |
| ) |  |  | `[inherited]`

uint32_t CxImage::GetFlags | ( |  | ) | const`[inherited]`

See also:
  SetFlags

int32_t CxImage::GetFrame | ( |  | ) | const`[inherited]`

Returns:
  the current selected image (zero-based index).

CxImage * CxImage::GetFrame | ( | int32_t | nFrame | ) | const`[inherited]`

uint32_t CxImage::GetFrameDelay | ( |  | ) | const`[inherited]`

Returns:
  current frame delay in milliseconds. Only for GIF and MNG formats.

uint32_t CxImage::GetHeight | ( |  | ) | const`[inherited]`

uint8_t CxImage::GetJpegQuality | ( |  | ) | const`[inherited]`

See also:
  SetJpegQuality, GetJpegQualityF

Author:
  [DP]; changes [Stefan Schürmans]

float CxImage::GetJpegQualityF | ( |  | ) | const`[inherited]`

See also:
  SetJpegQuality, GetJpegQuality

Author:
  [Stefan Schürmans]

uint8_t CxImage::GetJpegScale | ( |  | ) | const`[inherited]`

See also:
  SetJpegScale

const char * CxImage::GetLastError | ( |  | ) | `[inherited]`

Returns the last reported error.

uint32_t CxImage::GetNumColors | ( |  | ) | const`[inherited]`

Returns:
  2, 16, 256; 0 for RGB images.

int32_t CxImage::GetNumFrames | ( |  | ) | const`[inherited]`

This function must be used after a Decode() / Load() call. Use the sequence SetFrame(-1); Load(...); GetNumFrames(); to get the number of images without loading the first image.

Returns:
  the number of images in the file.

uint32_t CxImage::GetNumTypes | ( |  | ) | `[static, inherited]`

void CxImage::GetOffset | ( | int32_t * | x,
|  | int32_t * | y |
| ) |  |  | `[inherited]`

int32_t CxImage::GetProgress | ( |  | ) | const`[inherited]`

Used to monitor the slow loops.

Returns:
  value is from 0 to 100.

See also:
  SetProgress

bool CxImage::GetRetreiveAllFrames | ( |  | ) | const`[inherited]`

int32_t CxImage::GetSize | ( |  | ) | `[inherited]`

Returns:
  the size in bytes of the internal pDib object

RGBQUAD CxImage::GetTransColor | ( |  | ) | `[inherited]`

Returns:
  the color used for transparency, and/or for background color

int32_t CxImage::GetTransIndex | ( |  | ) | const`[inherited]`

Gets the index used for transparency. Returns -1 for no transparancy.

uint32_t CxImage::GetType | ( |  | ) | const`[inherited]`

Returns:
  original image format

See also:
  ENUM_CXIMAGE_FORMATS.

uint32_t CxImage::GetTypeIdFromIndex | ( | const uint32_t | index | ) | `[static, inherited]`

uint32_t CxImage::GetTypeIdFromName | ( | const TCHAR * | ext | ) | `[static, inherited]`

uint32_t CxImage::GetTypeIndexFromId | ( | const uint32_t | id | ) | `[static, inherited]`

const TCHAR * CxImage::GetVersion | ( |  | ) | `[static, inherited]`

const float CxImage::GetVersionNumber | ( |  | ) | `[static, inherited]`

Returns:
  A.BBCCCDDDD
  - A = main version
  - BB = main revision
  - CCC = minor revision (letter)
  - DDDD = experimental revision

uint32_t CxImage::GetWidth | ( |  | ) | const`[inherited]`

int32_t CxImage::GetXDPI | ( |  | ) | const`[inherited]`

Returns:
  Resolution for TIFF, JPEG, PNG and BMP formats.

int32_t CxImage::GetYDPI | ( |  | ) | const`[inherited]`

Returns:
  Resolution for TIFF, JPEG, PNG and BMP formats.

bool CxImage::IsEnabled | ( |  | ) | const`[inherited]`

True if the image is enabled for painting.

bool CxImage::IsTransparent | ( |  | ) | const`[inherited]`

bool CxImage::IsValid | ( |  | ) | const`[inherited]`

Checks if the image is correctly initializated.

bool CxImage::RotateExif | ( | int32_t | orientation = `0` | ) | `[inherited]`

void CxImage::SetClrImportant | ( | uint32_t | ncolors = `0` | ) | `[inherited]`

sets the maximum number of colors that some functions like DecreaseBpp() or GetNearestIndex() will use on indexed images

Parameters:

  | ncolors | should be less than 2^bpp, or 0 if all the colors are important.

bool CxImage::SetCodecOption | ( | uint32_t | opt,
|  | uint32_t | imagetype = `0` |
| ) |  |  | `[inherited]`

Encode option for GIF, TIF, JPG, PNG and RAW

- GIF : 0 = LZW (default), 1 = none, 2 = RLE.
- TIF : 0 = automatic (default), or a valid compression code as defined in "tiff.h" (COMPRESSION_NONE = 1, COMPRESSION_CCITTRLE = 2, ...)
- JPG : valid values stored in enum CODEC_OPTION ( ENCODE_BASELINE = 0x01, ENCODE_PROGRESSIVE = 0x10, ...)
- PNG : combination of interlace option and compression option interlace option : 1 = interlace, 0 = no interlace compression option : 2 = no compression, 4 = best speed, 6 = best compression, 8 = default compression default is no interlace and default compression example : 5 = 1+4 = interlace + best speed
- RAW : valid values stored in enum CODEC_OPTION ( DECODE_QUALITY_LIN = 0x00, DECODE_QUALITY_VNG = 0x01, ...)

Returns:
  true if everything is ok

void CxImage::SetDisposalMethod | ( | uint8_t | dm | ) | `[inherited]`

Sets the method for drawing the frame related to others

See also:
  GetDisposalMethod

void CxImage::SetEscape | ( | int32_t | i | ) | `[inherited]`

Used to quit the slow loops or the codecs.

- SetEscape(-1) before Decode forces the function to exit, right after the image width and height are available ( for bmp, jpg, gif, tif )

void CxImage::SetFlags | ( | uint32_t | flags,
|  | bool | bLockReservedFlags = `true` |
| ) |  |  | `[inherited]`

Image flags, for future use

Parameters:

  | flags |
  - 0x??00000 = reserved for 16 bit, CMYK, multilayer
  - 0x00??0000 = blend modes
  - 0x0000???? = layer id or user flags
  | bLockReservedFlags | protects the "reserved" and "blend modes" flags

void CxImage::SetFrame | ( | int32_t | nFrame | ) | `[inherited]`

Sets the image number that the next Decode() / Load() call will load

void CxImage::SetFrameDelay | ( | uint32_t | d | ) | `[inherited]`

Sets current frame delay. Only for GIF format.

Parameters:

  | d | = delay in milliseconds

void CxImage::SetJpegQuality | ( | uint8_t | q | ) | `[inherited]`

quality level for JPEG and JPEG2000

Parameters:

  | q,: | can be from 0 to 100

Author:
  [DP]; changes [Stefan Schürmans]

void CxImage::SetJpegQualityF | ( | float | q | ) | `[inherited]`

quality level for JPEG and JPEG2000 necessary for JPEG2000 when quality is between 0.0 and 1.0

Parameters:

  | q,: | can be from 0.0 to 100.0

Author:
  [Stefan Schürmans]

void CxImage::SetJpegScale | ( | uint8_t | q | ) | `[inherited]`

scaling down during JPEG decoding valid numbers are 1, 2, 4, 8

Author:
  [ignacio]

void CxImage::SetOffset | ( | int32_t | x,
|  | int32_t | y |
| ) |  |  | `[inherited]`

void CxImage::SetProgress | ( | int32_t | p | ) | `[inherited]`

Forces the value of the internal progress variable.

Parameters:

  | p | should be from 0 to 100.

See also:
  GetProgress

void CxImage::SetRetreiveAllFrames | ( | bool | flag | ) | `[inherited]`

void CxImage::SetTransColor | ( | RGBQUAD | rgb | ) | `[inherited]`

Sets the color used for transparency with 24 bpp images. You must call SetTransIndex(0) to enable the effect, SetTransIndex(-1) to disable it.

void CxImage::SetTransIndex | ( | int32_t | idx | ) | `[inherited]`

Sets the index used for transparency with 1, 4 and 8 bpp images. Set to -1 to remove the effect.

bool CxImage::SetType | ( | uint32_t | type | ) | `[inherited]`

change image format identifier

See also:
  ENUM_CXIMAGE_FORMATS.

void CxImage::SetXDPI | ( | int32_t | dpi | ) | `[inherited]`

Set resolution for TIFF, JPEG, PNG and BMP formats.

void CxImage::SetYDPI | ( | int32_t | dpi | ) | `[inherited]`

Set resolution for TIFF, JPEG, PNG and BMP formats.