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

Interface for CImageIO wrapper. More...

Go to the source code of this file.

Functions

CImageIO CImageIO_Create (const CIDRS argIdrs, idrs_exception *pargException)
 Create object.
 
CImage CImageIO_LoadImage (const CImageIO argCImageIO, const idrs_string strFileName, IDRS_UINT const uiImageIndex, idrs_exception *pargException)
 LoadImage loads an image from a file.
 
CImage CImageIO_LoadImage2 (const CImageIO argCImageIO, const idrs_string strFileName, idrs_exception *pargException)
 LoadImage loads an image from a file.
 
CImage CImageIO_LoadImage3 (const CImageIO argCImageIO, IByteStream argInputStream, IDRS_UINT const uiImageIndex, idrs_exception *pargException)
 LoadImage loads an image from a stream.
 
CImage CImageIO_LoadImage4 (const CImageIO argCImageIO, IByteStream argInputStream, idrs_exception *pargException)
 LoadImage loads an image from a stream.
 
void CImageIO_SaveImage (const CImageIO argCImageIO, const CImage argImage, const idrs_string strFileName, enum ImageFormat const ffFileFormat, idrs_exception *pargException)
 SaveImage saves an image to a file using the supplied image plugin.
 
void CImageIO_SaveImage2 (const CImageIO argCImageIO, const CImage argImage, IByteStream objStream, enum ImageFormat const ffFileFormat, idrs_exception *pargException)
 SaveImage saves an image to a stream using the supplied image plugin.
 
CPage CImageIO_LoadPage (const CImageIO argCImageIO, const idrs_string strFileName, IDRS_UINT const uiImageIndex, idrs_exception *pargException)
 LoadPage loads the source image from a file.
 
CPage CImageIO_LoadPage2 (const CImageIO argCImageIO, const idrs_string strFileName, idrs_exception *pargException)
 LoadPage loads the source image from a file.
 
CPage CImageIO_LoadPage3 (const CImageIO argCImageIO, IByteStream argInputStream, IDRS_UINT const uiImageIndex, idrs_exception *pargException)
 LoadPage loads the source image from the supplied stream.
 
CPage CImageIO_LoadPage4 (const CImageIO argCImageIO, IByteStream argInputStream, idrs_exception *pargException)
 LoadPage loads the source image from the supplied stream.
 
CDocument CImageIO_LoadDocument (const CImageIO argCImageIO, IByteStream argInputStream, idrs_exception *pargException)
 LoadDocument loads the source image from the supplied stream.
 
CDocument CImageIO_LoadDocument2 (const CImageIO argCImageIO, const idrs_string strFileName, idrs_exception *pargException)
 LoadDocument loads the source image from the supplied stream.
 
void CImageIO_LoadPages (const CImageIO argCImageIO, IByteStream argInputStream, IPageCollection argPageCollection, idrs_exception *pargException)
 Loads the source image from the supplied stream and appends resulting page(s) to the provided collection.
 
void CImageIO_LoadPages2 (const CImageIO argCImageIO, const idrs_string strFileName, IPageCollection argPageCollection, idrs_exception *pargException)
 Loads the source image from the supplied stream and appends resulting page(s) to the provided collection.
 
void CImageIO_SavePage (const CImageIO argCImageIO, const CPage argPage, const idrs_string strFileName, enum ImageFormat const ffFileFormat, idrs_exception *pargException)
 SavePage saves the source image to a file.
 
void CImageIO_SavePage2 (const CImageIO argCImageIO, const CPage argPage, IByteStream argStream, enum ImageFormat const evFileFormat, idrs_exception *pargException)
 SavePage saves the source image to a file using the specified image compressor.
 
IDRS_UINT CImageIO_GetPageCount (const CImageIO argCImageIO, const idrs_string strFileName, idrs_exception *pargException)
 Retrieves the page count for multiple page documents This function can be used in all page formats. Multiple page formats ( TIFF, PDF ) and single page formats. For single page formats the page count will be 1.
 
IDRS_UINT CImageIO_GetPageCount2 (const CImageIO argCImageIO, IByteStream argInputStream, idrs_exception *pargException)
 Retrieves the page count for multiple page documents This function can be used in all page formats. Multiple page formats ( TIFF, PDF ) and single page formats. For single page formats the page count will be 1.
 
CImageLoadOptionsPdf CImageIO_GetPdfLoadOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the PDF loading options object.
 
void CImageIO_SetPdfLoadOptions (CImageIO argCImageIO, const CImageLoadOptionsPdf argPdfLoadOptions, idrs_exception *pargException)
 Set the PDF loading options with the provided object.
 
CImageSaveOptionsJpeg CImageIO_GetJpegSaveOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the JPEG saving options object.
 
void CImageIO_SetJpegSaveOptions (CImageIO argCImageIO, const CImageSaveOptionsJpeg argJpegSaveOptions, idrs_exception *pargException)
 Set the JPEG options for saving.
 
CImageSaveOptionsJpeg2000 CImageIO_GetJpeg2000SaveOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the JPEG 2000 saving options object.
 
void CImageIO_SetJpeg2000SaveOptions (CImageIO argCImageIO, const CImageSaveOptionsJpeg2000 argJpeg2000SaveOptions, idrs_exception *pargException)
 Set the JPEG 2000 options for saving.
 
CImageSaveOptionsPng CImageIO_GetPngSaveOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the PNG saving options object.
 
void CImageIO_SetPngSaveOptions (CImageIO argCImageIO, const CImageSaveOptionsPng argPngSaveOptions, idrs_exception *pargException)
 Set the PNG options for saving.
 
CImageSaveOptionsPdf CImageIO_GetPdfSaveOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the PDF saving options object.
 
void CImageIO_SetPdfSaveOptions (CImageIO argCImageIO, const CImageSaveOptionsPdf argPdfSaveOptions, idrs_exception *pargException)
 Set the PDF options for saving.
 
CImageSaveOptionsTiff CImageIO_GetTiffSaveOptions (const CImageIO argCImageIO, idrs_exception *pargException)
 Get the Tiff saving options object.
 
void CImageIO_SetTiffSaveOptions (CImageIO argCImageIO, const CImageSaveOptionsTiff argTiffSaveOptions, idrs_exception *pargException)
 Set the Tiff options for saving.
 
void CImageIO_Destroy (CImageIO argCImageIO, idrs_exception *pargException)
 Destroys a CImageIO handle.
 

Detailed Description

Interface for CImageIO wrapper.

Function Documentation

◆ CImageIO_Create()

CImageIO CImageIO_Create ( const CIDRS  argIdrs,
idrs_exception *  pargException 
)

Create object.

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

◆ CImageIO_Destroy()

void CImageIO_Destroy ( CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Destroys a CImageIO handle.

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

◆ CImageIO_GetJpeg2000SaveOptions()

CImageSaveOptionsJpeg2000 CImageIO_GetJpeg2000SaveOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the JPEG 2000 saving options object.

Returns
The CImageSaveOptionsJpeg object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_GetJpegSaveOptions()

CImageSaveOptionsJpeg CImageIO_GetJpegSaveOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the JPEG saving options object.

Returns
The CImageSaveOptionsJpeg object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_GetPageCount()

IDRS_UINT CImageIO_GetPageCount ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
idrs_exception *  pargException 
)

Retrieves the page count for multiple page documents This function can be used in all page formats. Multiple page formats ( TIFF, PDF ) and single page formats. For single page formats the page count will be 1.

IMAGE_FILE module is required to use an image as an input, and IDRS_FILE_EXTENSION_PDF is required for pdf file input. Function will first check if all required modules are enabled and throw an exception in any different case

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the input file.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The number of pages of the document.

◆ CImageIO_GetPageCount2()

IDRS_UINT CImageIO_GetPageCount2 ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
idrs_exception *  pargException 
)

Retrieves the page count for multiple page documents This function can be used in all page formats. Multiple page formats ( TIFF, PDF ) and single page formats. For single page formats the page count will be 1.

IMAGE_FILE module is required to use an image as an input, and IDRS_FILE_EXTENSION_PDF is required for pdf file input. Function will first check if all required modules are enabled and throw an exception in any different case

Parameters
argCImageIOCImageIO handle
argInputStreamThe input stream object
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The number of pages of the document.

◆ CImageIO_GetPdfLoadOptions()

CImageLoadOptionsPdf CImageIO_GetPdfLoadOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the PDF loading options object.

Returns
The CImageLoadOptionsPdf object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_GetPdfSaveOptions()

CImageSaveOptionsPdf CImageIO_GetPdfSaveOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the PDF saving options object.

Returns
The CImageSaveOptionsPdf object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_GetPngSaveOptions()

CImageSaveOptionsPng CImageIO_GetPngSaveOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the PNG saving options object.

Returns
The CImageSaveOptionsPng object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_GetTiffSaveOptions()

CImageSaveOptionsTiff CImageIO_GetTiffSaveOptions ( const CImageIO  argCImageIO,
idrs_exception *  pargException 
)

Get the Tiff saving options object.

Returns
The CImageSaveOptionsPdf object
Parameters
argCImageIOCImageIO handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_LoadDocument()

CDocument CImageIO_LoadDocument ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
idrs_exception *  pargException 
)

LoadDocument loads the source image from the supplied stream.

Parameters
argCImageIOCImageIO handle
argInputStreamThe input stream
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
A new document object that uses the CDefaultPageCollection implementation to store the pages.

◆ CImageIO_LoadDocument2()

CDocument CImageIO_LoadDocument2 ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
idrs_exception *  pargException 
)

LoadDocument loads the source image from the supplied stream.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the file that contains the source image.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
A new document object that uses the CDefaultPageCollection implementation to store the pages.

◆ CImageIO_LoadImage()

CImage CImageIO_LoadImage ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
IDRS_UINT const  uiImageIndex,
idrs_exception *  pargException 
)

LoadImage loads an image from a file.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the input file.
uiImageIndexThe 0 based index of the image to load from the provided file
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created image.
Attention
This function requires the imaging module to be enabled in order to load a file.
Remarks
The method will interrogate the registered plugins (see CImagePluginManager) until finding one having the necessary loading capabilities.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is different than 0 for non-multipage formats (any other than TIFF and PDF).

◆ CImageIO_LoadImage2()

CImage CImageIO_LoadImage2 ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
idrs_exception *  pargException 
)

LoadImage loads an image from a file.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the input file.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created image.
Attention
This function requires the imaging module to be enabled in order to load a file.
Remarks
The method will interrogate the registered plugins (see CImagePluginManager) until finding one having the necessary loading capabilities.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is different than 0 for non-multipage formats (any other than TIFF and PDF).

◆ CImageIO_LoadImage3()

CImage CImageIO_LoadImage3 ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
IDRS_UINT const  uiImageIndex,
idrs_exception *  pargException 
)

LoadImage loads an image from a stream.

Parameters
argCImageIOCImageIO handle
argInputStreamThe stream containing the image to be loaded
uiImageIndexThe 0 based index of the image to load from the provided file
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created image.
Attention
This function requires the imaging module to be enabled in order to load a file.
iDRS default image plugin will throw an exception if uiImageIndex is different than 0 for non-multipage formats (any other than TIFF and PDF).
The provided stream must contain one file.
See also
IDRS::CFileStream
IDRS::CMemoryStream

◆ CImageIO_LoadImage4()

CImage CImageIO_LoadImage4 ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
idrs_exception *  pargException 
)

LoadImage loads an image from a stream.

Parameters
argCImageIOCImageIO handle
argInputStreamThe stream containing the image to be loaded
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created image.
Attention
This function requires the imaging module to be enabled in order to load a file.
iDRS default image plugin will throw an exception if uiImageIndex is different than 0 for non-multipage formats (any other than TIFF and PDF).
The provided stream must contain one file.
See also
IDRS::CFileStream
IDRS::CMemoryStream

◆ CImageIO_LoadPage()

CPage CImageIO_LoadPage ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
IDRS_UINT const  uiImageIndex,
idrs_exception *  pargException 
)

LoadPage loads the source image from a file.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the file that contains the source image.
uiImageIndexThe 0 based index of the image to load from the provided file
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created page.
Note
Removing zones also removes the page layout.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is uiPageIndex than 0 for non-multipage formats (any other than TIFF and PDF).

◆ CImageIO_LoadPage2()

CPage CImageIO_LoadPage2 ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
idrs_exception *  pargException 
)

LoadPage loads the source image from a file.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the file that contains the source image.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created page.
Note
Removing zones also removes the page layout.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is uiPageIndex than 0 for non-multipage formats (any other than TIFF and PDF).

◆ CImageIO_LoadPage3()

CPage CImageIO_LoadPage3 ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
IDRS_UINT const  uiImageIndex,
idrs_exception *  pargException 
)

LoadPage loads the source image from the supplied stream.

Parameters
argCImageIOCImageIO handle
argInputStreamThe input stream
uiImageIndexThe 0 based index of the image to load from the provided file
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created page.
Note
Removing zones also removes the page layout.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is uiPageIndex than 0 for non-multipage formats (any other than TIFF and PDF).
The provided stream must contain one file.

◆ CImageIO_LoadPage4()

CPage CImageIO_LoadPage4 ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
idrs_exception *  pargException 
)

LoadPage loads the source image from the supplied stream.

Parameters
argCImageIOCImageIO handle
argInputStreamThe input stream
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created page.
Note
Removing zones also removes the page layout.
Attention
iDRS default image plugin will throw an exception if uiImageIndex is uiPageIndex than 0 for non-multipage formats (any other than TIFF and PDF).
The provided stream must contain one file.

◆ CImageIO_LoadPages()

void CImageIO_LoadPages ( const CImageIO  argCImageIO,
IByteStream  argInputStream,
IPageCollection  argPageCollection,
idrs_exception *  pargException 
)

Loads the source image from the supplied stream and appends resulting page(s) to the provided collection.

Parameters
argCImageIOCImageIO handle
argInputStreamThe input stream
argPageCollectionThe page collection where to append the resulting page(s).
pargExceptionPointer to exception structure that will be filled if an exception occurs
Attention
This function requires the imaging module to be enabled in order to load a file as image.

◆ CImageIO_LoadPages2()

void CImageIO_LoadPages2 ( const CImageIO  argCImageIO,
const idrs_string  strFileName,
IPageCollection  argPageCollection,
idrs_exception *  pargException 
)

Loads the source image from the supplied stream and appends resulting page(s) to the provided collection.

Parameters
argCImageIOCImageIO handle
strFileNameThe name of the file that contains the source image.
argPageCollectionThe page collection where to append the resulting page(s).
pargExceptionPointer to exception structure that will be filled if an exception occurs
Attention
This function requires the imaging module to be enabled in order to load a file as image.

◆ CImageIO_SaveImage()

void CImageIO_SaveImage ( const CImageIO  argCImageIO,
const CImage  argImage,
const idrs_string  strFileName,
enum ImageFormat const  ffFileFormat,
idrs_exception *  pargException 
)

SaveImage saves an image to a file using the supplied image plugin.

In case the supplied image plugin does not know how to save the indicated file format, the function with throw IDRS_ERROR_FILE_FORMAT

Parameters
argCImageIOCImageIO handle
argImageThe CImage object containing the image data.
strFileNameThe name of the output file.
ffFileFormatThe file format
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SaveImage2()

void CImageIO_SaveImage2 ( const CImageIO  argCImageIO,
const CImage  argImage,
IByteStream  objStream,
enum ImageFormat const  ffFileFormat,
idrs_exception *  pargException 
)

SaveImage saves an image to a stream using the supplied image plugin.

In case the supplied image plugin does not know how to save the indicated file format, the function with throw IDRS_ERROR_FILE_FORMAT

Parameters
argCImageIOCImageIO handle
argImageThe CImage object containing the image data.
objStreamThe IByteStream object where to write the compressed image
ffFileFormatThe file format
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SavePage()

void CImageIO_SavePage ( const CImageIO  argCImageIO,
const CPage  argPage,
const idrs_string  strFileName,
enum ImageFormat const  ffFileFormat,
idrs_exception *  pargException 
)

SavePage saves the source image to a file.

See also
CImage::Save
Parameters
argCImageIOCImageIO handle
argPageThe CPage object containing the page data.
strFileNameThe name of the file.
ffFileFormatThe file format.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Attention
It requires an imaging module to be enabled in order to save the files.

◆ CImageIO_SavePage2()

void CImageIO_SavePage2 ( const CImageIO  argCImageIO,
const CPage  argPage,
IByteStream  argStream,
enum ImageFormat const  evFileFormat,
idrs_exception *  pargException 
)

SavePage saves the source image to a file using the specified image compressor.

See also
CImage::Save
Parameters
argCImageIOCImageIO handle
argPageThe CPage object containing the page data.
argStreamThe stream where to store the image data
evFileFormatThe file format.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetJpeg2000SaveOptions()

void CImageIO_SetJpeg2000SaveOptions ( CImageIO  argCImageIO,
const CImageSaveOptionsJpeg2000  argJpeg2000SaveOptions,
idrs_exception *  pargException 
)

Set the JPEG 2000 options for saving.

Parameters
argCImageIOCImageIO handle
argJpeg2000SaveOptionsThe CImageSaveOptionsJpeg2000 to be provided
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetJpegSaveOptions()

void CImageIO_SetJpegSaveOptions ( CImageIO  argCImageIO,
const CImageSaveOptionsJpeg  argJpegSaveOptions,
idrs_exception *  pargException 
)

Set the JPEG options for saving.

Parameters
argCImageIOCImageIO handle
argJpegSaveOptionsThe CImageSaveOptionsJpeg to be provided
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetPdfLoadOptions()

void CImageIO_SetPdfLoadOptions ( CImageIO  argCImageIO,
const CImageLoadOptionsPdf  argPdfLoadOptions,
idrs_exception *  pargException 
)

Set the PDF loading options with the provided object.

Parameters
argCImageIOCImageIO handle
argPdfLoadOptionsThe CImageLoadOptionsPdf object
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetPdfSaveOptions()

void CImageIO_SetPdfSaveOptions ( CImageIO  argCImageIO,
const CImageSaveOptionsPdf  argPdfSaveOptions,
idrs_exception *  pargException 
)

Set the PDF options for saving.

Parameters
argCImageIOCImageIO handle
argPdfSaveOptionsThe CImageSaveOptionsPdf to be provided
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetPngSaveOptions()

void CImageIO_SetPngSaveOptions ( CImageIO  argCImageIO,
const CImageSaveOptionsPng  argPngSaveOptions,
idrs_exception *  pargException 
)

Set the PNG options for saving.

Parameters
argCImageIOCImageIO handle
argPngSaveOptionsThe CImageSaveOptionsPng to be provided
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CImageIO_SetTiffSaveOptions()

void CImageIO_SetTiffSaveOptions ( CImageIO  argCImageIO,
const CImageSaveOptionsTiff  argTiffSaveOptions,
idrs_exception *  pargException 
)

Set the Tiff options for saving.

Parameters
argCImageIOCImageIO handle
argTiffSaveOptionsThe CImageSaveOptionsTiff to be provided
pargExceptionPointer to exception structure that will be filled if an exception occurs