iDRS™ SDK 16
Loading...
Searching...
No Matches
CImage_interface.h File Reference

Interface for CImage wrapper. More...

Go to the source code of this file.

Functions

CImage CImage_Create (CIDRS argIDRS, idrs_exception *pargException)
 Create creates an empty image.
 
CImage CImage_Create2 (CIDRS argIDRS, IDRS_UINT32 const uiWidth, IDRS_UINT32 const uiHeight, enum ColorMode const colorMode, IDRS_UINT32 const uiResolution, idrs_exception *pargException)
 Create creates an image buffer with the given characteristics.
 
CImage CImage_Create3 (const CImage argImage, idrs_exception *pargException)
 Creates an image and initializes it with the content of the supplied image parameter.
 
void CImage_CreateBitmap (CImage argCImage, IDRS_UINT const uiWidth, IDRS_UINT const uiHeight, enum ColorMode const colorMode, IDRS_UINT const uiResolution, idrs_exception *pargException)
 CreateBitmap modifies the current image buffer to fit to the specified characteristics.
 
void CImage_CreateBitmap2 (CImage argCImage, IDRS_UINT const uiWidth, IDRS_UINT const uiHeight, enum ColorMode const colorMode, IDRS_UINT const uiResolution, ILineReader lrLineReader, idrs_exception *pargException)
 CreateBitmap modifies the current image buffer to meet the characteristics and sets its lines using the given line reader.
 
CImage CImage_Clone (const CImage argCImage, idrs_exception *pargException)
 Clone the current image.
 
IDRS_UINT CImage_GetWidth (const CImage argCImage, idrs_exception *pargException)
 Gets the image width, in pixels.
 
IDRS_UINT CImage_GetHeight (const CImage argCImage, idrs_exception *pargException)
 Gets the image width, in pixels.
 
IDRS_UINT CImage_GetByteWidth (const CImage argCImage, idrs_exception *pargException)
 Gets the image byte width.
 
IDRS_UINT CImage_GetImageSize (const CImage argCImage, idrs_exception *pargException)
 Gets the image size, in bytes.
 
IDRS_UINT CImage_GetResolution (const CImage argCImage, idrs_exception *pargException)
 Gets the image resolution.
 
IDRS_UINT CImage_GetBitsPerPixel (const CImage argCImage, idrs_exception *pargException)
 Gets the image bit per pixels info.
 
void CImage_SetResolution (CImage argCImage, IDRS_UINT const uiResolution, idrs_exception *pargException)
 
CImagePixels CImage_GetImagePixels (const CImage argCImage, idrs_exception *pargException)
 Gets the image pixels data.
 
enum ColorMode CImage_GetColorMode (const CImage argCImage, idrs_exception *pargException)
 Returns the color mode of the image.
 
const CIDRS CImage_GetIDRS (const CImage argCImage, idrs_exception *pargException)
 Returns the CIDRS handle used.
 
IDRS_BOOL CImage_IsDefaultResolution (const CImage argCImage, idrs_exception *pargException)
 Provides the information, if the current resolution parameter is the default one.
 
void CImage_Destroy (CImage argCImage, idrs_exception *pargException)
 Destroys a CImage handle.
 

Detailed Description

Interface for CImage wrapper.

Function Documentation

◆ CImage_Clone()

CImage CImage_Clone ( const CImage  argCImage,
idrs_exception *  pargException 
)

Clone the current image.

Returns
The cloned image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_Create()

CImage CImage_Create ( CIDRS  argIDRS,
idrs_exception *  pargException 
)

Create creates an empty image.

Parameters
argIDRS- CIDRS handle object
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_Create2()

CImage CImage_Create2 ( CIDRS  argIDRS,
IDRS_UINT32 const  uiWidth,
IDRS_UINT32 const  uiHeight,
enum ColorMode const  colorMode,
IDRS_UINT32 const  uiResolution,
idrs_exception *  pargException 
)

Create creates an image buffer with the given characteristics.

Parameters
argIDRS- CIDRS handle object
uiWidthThe width in pixels of the image.
uiHeightThe height in pixels of the image.
colorModeThe image color mode.
uiResolutionThe resolution of the image.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_Create3()

CImage CImage_Create3 ( const CImage  argImage,
idrs_exception *  pargException 
)

Creates an image and initializes it with the content of the supplied image parameter.

Parameters
argImage- the source image that will be copied to the newly created image
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_CreateBitmap()

void CImage_CreateBitmap ( CImage  argCImage,
IDRS_UINT const  uiWidth,
IDRS_UINT const  uiHeight,
enum ColorMode const  colorMode,
IDRS_UINT const  uiResolution,
idrs_exception *  pargException 
)

CreateBitmap modifies the current image buffer to fit to the specified characteristics.

Parameters
argCImageCImage handle
uiWidthThe width in pixels of the image.
uiHeightThe height in pixels of the image.
colorModeThe color mode
uiResolutionThe resolution of the image.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_CreateBitmap2()

void CImage_CreateBitmap2 ( CImage  argCImage,
IDRS_UINT const  uiWidth,
IDRS_UINT const  uiHeight,
enum ColorMode const  colorMode,
IDRS_UINT const  uiResolution,
ILineReader  lrLineReader,
idrs_exception *  pargException 
)

CreateBitmap modifies the current image buffer to meet the characteristics and sets its lines using the given line reader.

Parameters
argCImageCImage handle
uiWidthThe width in pixels of the image.
uiHeightThe height in pixels of the image.
colorModeThe color mode
uiResolutionThe resolution of the image.
lrLineReaderThe object that provides the lines of the image.
pargExceptionPointer to exception structure that will be filled if an exception occurs
See also
ILineReader

◆ CImage_Destroy()

void CImage_Destroy ( CImage  argCImage,
idrs_exception *  pargException 
)

Destroys a CImage handle.

Parameters
argCImageCImage handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetBitsPerPixel()

IDRS_UINT CImage_GetBitsPerPixel ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image bit per pixels info.

Returns
The number of bits per pixels for the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetByteWidth()

IDRS_UINT CImage_GetByteWidth ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image byte width.

Note
iDRS black and white images are one bit per pixel, aligned on 32 bits.
iDRS greyscale images are 8 bits per pixel with no alignment. This means that byte width equals the pixel width.
iDRS color images are 24 bits per pixel with no alignment. This means that byte width is equal to 3 times the pixel width.
Returns
The width in bytes of the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetColorMode()

enum ColorMode CImage_GetColorMode ( const CImage  argCImage,
idrs_exception *  pargException 
)

Returns the color mode of the image.

Returns
The color mode of the image. If the image is not yet initialized, the returned color mode value is ColorMode::UNKNOWN
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetHeight()

IDRS_UINT CImage_GetHeight ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image width, in pixels.

Returns
The height in pixels of the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetIDRS()

const CIDRS CImage_GetIDRS ( const CImage  argCImage,
idrs_exception *  pargException 
)

Returns the CIDRS handle used.

Returns
the CIDRS handle used during object initialization
Exceptions
CIDRSExceptionif the object is not initialized
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetImagePixels()

CImagePixels CImage_GetImagePixels ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image pixels data.

Returns
The pixels of the image
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetImageSize()

IDRS_UINT CImage_GetImageSize ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image size, in bytes.

Returns
The size in bytes of the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetResolution()

IDRS_UINT CImage_GetResolution ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image resolution.

Returns
The resolution of the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_GetWidth()

IDRS_UINT CImage_GetWidth ( const CImage  argCImage,
idrs_exception *  pargException 
)

Gets the image width, in pixels.

Returns
The width in pixels of the image.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_IsDefaultResolution()

IDRS_BOOL CImage_IsDefaultResolution ( const CImage  argCImage,
idrs_exception *  pargException 
)

Provides the information, if the current resolution parameter is the default one.

Returns
IDRS_TRUE if the current resolution is set by default in the iDRS, IDRS_FALSE otherwise.
Parameters
argCImageCImage handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImage_SetResolution()

void CImage_SetResolution ( CImage  argCImage,
IDRS_UINT const  uiResolution,
idrs_exception *  pargException 
)

Sets the image resolution.

Parameters
argCImageCImage handle
uiResolutionThe new resolution (dots per inch).
pargExceptionPointer to exception structure that will be filled if an exception occurs