- Main Page
- Modules
- Classes
- Files

# Encode

## Functions
bool | CxImage::Save (const TCHAR *filename, DWORD imagetype)
bool | CxImage::Encode (FILE *hFile, DWORD imagetype)
bool | CxImage::Encode (CxFile *hFile, DWORD imagetype)
bool | CxImage::Encode (CxFile *hFile, CxImage **pImages, int pagecount, DWORD imagetype)
bool | CxImage::Encode (FILE *hFile, CxImage **pImages, int pagecount, DWORD imagetype)
bool | CxImage::Encode (BYTE *&buffer, long &size, DWORD imagetype)
bool | CxImage::Encode2RGBA (CxFile *hFile, bool bFlipY=false)
bool | CxImage::Encode2RGBA (BYTE *&buffer, long &size, bool bFlipY=false)

## Detailed Description

## Function Documentation

bool CxImage::Encode | ( | BYTE *& | buffer,
|  | long & | size,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to memory buffer the image in a specific format.

Parameters:

  | buffer,: | output memory buffer pointer. Must be NULL, the function allocates and fill the memory, the application must free the buffer, see also FreeMemory().
  | size,: | output memory buffer size.
  | imagetype,: | file format, see ENUM_CXIMAGE_FORMATS

Returns:
  true if everything is ok

bool CxImage::Encode | ( | FILE * | hFile,
|  | CxImage ** | pImages,
|  | int | pagecount,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to disk or memory pagecount images, referenced by an array of CxImage pointers.

Parameters:

  | hFile,: | file handle.
  | pImages,: | array of CxImage pointers.
  | pagecount,: | number of images.
  | imagetype,: | can be CXIMAGE_FORMAT_TIF or CXIMAGE_FORMAT_GIF.

Returns:
  true if everything is ok

bool CxImage::Encode | ( | CxFile * | hFile,
|  | CxImage ** | pImages,
|  | int | pagecount,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to disk or memory pagecount images, referenced by an array of CxImage pointers.

Parameters:

  | hFile,: | file handle (CxMemFile or CxIOFile), with write access.
  | pImages,: | array of CxImage pointers.
  | pagecount,: | number of images.
  | imagetype,: | can be CXIMAGE_FORMAT_TIF, CXIMAGE_FORMAT_GIF or CXIMAGE_FORMAT_ICO.

Returns:
  true if everything is ok

bool CxImage::Encode | ( | CxFile * | hFile,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to disk the image in a specific format.

Parameters:

  | hFile,: | file handle (CxMemFile or CxIOFile), with write access.
  | imagetype,: | file format, see ENUM_CXIMAGE_FORMATS

Returns:
  true if everything is ok

See also:
  ENUM_CXIMAGE_FORMATS

bool CxImage::Encode | ( | FILE * | hFile,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to disk the image in a specific format.

Parameters:

  | hFile,: | file handle, open and enabled for writing.
  | imagetype,: | file format, see ENUM_CXIMAGE_FORMATS

Returns:
  true if everything is ok

bool CxImage::Encode2RGBA | ( | BYTE *& | buffer,
|  | long & | size,
|  | bool | bFlipY = `false` |
| ) |  |  | `[inherited]`

exports the image into a RGBA buffer, Useful for OpenGL applications.

Parameters:

  | buffer,: | output memory buffer pointer. Must be NULL, the function allocates and fill the memory, the application must free the buffer, see also FreeMemory().
  | size,: | output memory buffer size.
  | bFlipY,: | direction of Y axis. default = false.

Returns:
  true if everything is ok

bool CxImage::Encode2RGBA | ( | CxFile * | hFile,
|  | bool | bFlipY = `false` |
| ) |  |  | `[inherited]`

exports the image into a RGBA buffer, Useful for OpenGL applications.

Parameters:

  | hFile,: | file handle (CxMemFile or CxIOFile), with write access.
  | bFlipY,: | direction of Y axis. default = false.

Returns:
  true if everything is ok

bool CxImage::Save | ( | const TCHAR * | filename,
|  | DWORD | imagetype |
| ) |  |  | `[inherited]`

Saves to disk the image in a specific format.

Parameters:

  | filename,: | file name
  | imagetype,: | file format, see ENUM_CXIMAGE_FORMATS

Returns:
  true if everything is ok