CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
OdRxRasterServices Class Referenceabstract

#include <RxRasterServices.h>

Inheritance diagram for OdRxRasterServices:
OdRxModule OdRxObject

Public Types

enum  ImageType {
  kUnknown = -1 , kBMP = OD_FOURCC(lit_B, lit_M, lit_P, lit_ ) , kICO = OD_FOURCC(lit_I, lit_C, lit_O, lit_ ) , kJPEG = OD_FOURCC(lit_J, lit_P, lit_E, lit_G) ,
  kJNG = OD_FOURCC(lit_J, lit_N, lit_G, lit_ ) , kKOALA = OD_FOURCC(lit_K, lit_O, lit_A, lit_L) , kLBM = OD_FOURCC(lit_L, lit_B, lit_M, lit_ ) , kIFF = kLBM ,
  kMNG = OD_FOURCC(lit_M, lit_N, lit_G, lit_ ) , kPBM = OD_FOURCC(lit_P, lit_B, lit_M, lit_ ) , kPBMRAW = OD_FOURCC(lit_P, lit_B, lit_M, lit_R) , kPCD = OD_FOURCC(lit_P, lit_C, lit_D, lit_ ) ,
  kPCX = OD_FOURCC(lit_P, lit_C, lit_X, lit_ ) , kPGM = OD_FOURCC(lit_P, lit_G, lit_M, lit_ ) , kPGMRAW = OD_FOURCC(lit_P, lit_G, lit_M, lit_R) , kPNG = OD_FOURCC(lit_P, lit_N, lit_G, lit_ ) ,
  kPPM = OD_FOURCC(lit_P, lit_P, lit_M, lit_ ) , kPPMRAW = OD_FOURCC(lit_P, lit_P, lit_M, lit_R) , kRAS = OD_FOURCC(lit_R, lit_A, lit_S, lit_ ) , kTARGA = OD_FOURCC(lit_T, lit_G, lit_A, lit_ ) ,
  kTIFF = OD_FOURCC(lit_T, lit_I, lit_F, lit_F) , kWBMP = OD_FOURCC(lit_W, lit_B, lit_M, lit_P) , kPSD = OD_FOURCC(lit_P, lit_S, lit_D, lit_ ) , kCUT = OD_FOURCC(lit_C, lit_U, lit_T, lit_ ) ,
  kXBM = OD_FOURCC(lit_X, lit_B, lit_M, lit_ ) , kXPM = OD_FOURCC(lit_X, lit_P, lit_M, lit_ ) , kDDS = OD_FOURCC(lit_D, lit_D, lit_S, lit_ ) , kGIF = OD_FOURCC(lit_G, lit_I, lit_F, lit_ ) ,
  kHDR = OD_FOURCC(lit_H, lit_D, lit_R, lit_ ) , kFAXG3 = OD_FOURCC(lit_F, lit_X, lit_G, lit_3) , kSGI = OD_FOURCC(lit_S, lit_G, lit_I, lit_ ) , kEXR = OD_FOURCC(lit_E, lit_X, lit_R, lit_ ) ,
  kJ2K = OD_FOURCC(lit_J, lit_2, lit_K, lit_ ) , kJP2 = OD_FOURCC(lit_J, lit_P, lit_2, lit_ ) , kPFM = OD_FOURCC(lit_P, lit_F, lit_M, lit_ ) , kPICT = OD_FOURCC(lit_P, lit_I, lit_C, lit_T) ,
  kRAW = OD_FOURCC(lit_R, lit_A, lit_W, lit_ )
}
 
enum  LoadFlags { kLoadFmt = OD_FOURCC(lit_F, lit_M, lit_T, lit_ ) , kNoTIFFRotation = OD_FOURCC(lit_N, lit_T, lit_F, lit_R) }
 
enum  SaveFlags {
  kTransparentColor = OD_FOURCC(lit_T, lit_C, lit_L, lit_R) , kJpegQuality = OD_FOURCC(lit_J, lit_Q, lit_T, lit_Y) , kTiffCompression = OD_FOURCC(lit_T, lit_C, lit_M, lit_P) , kTiffCompressionDeflate = OD_FOURCC(lit_Z, lit_I, lit_P, lit_ ) ,
  kTiffCompressionLzw = OD_FOURCC(lit_L, lit_Z, lit_W, lit_ ) , kTiffCompressionJpeg = OD_FOURCC(lit_J, lit_P, lit_E, lit_G) , kTiffCompressionCCITTFax3 = OD_FOURCC(lit_F, lit_A, lit_X, lit_3) , kTiffCompressionCCITTFax4 = OD_FOURCC(lit_F, lit_A, lit_X, lit_4) ,
  kTiffCompressionEmbedded = OD_FOURCC(lit_E, lit_M, lit_B, lit_D) , kDithering = OD_FOURCC(lit_D, lit_I, lit_T, lit_H) , kDitheringFS = OD_FOURCC(lit_D, lit_T, lit_F, lit_S) , kDitheringBayer4x4 = OD_FOURCC(lit_B, lit_Y, lit_R, lit_4) ,
  kDitheringBayer8x8 = OD_FOURCC(lit_B, lit_Y, lit_R, lit_8) , kDitheringBayer16x16 = OD_FOURCC(lit_B, lit_R, lit_1, lit_6) , kDitheringCluster6x6 = OD_FOURCC(lit_C, lit_L, lit_R, lit_6) , kDitheringCluster8x8 = OD_FOURCC(lit_C, lit_L, lit_R, lit_8) ,
  kDitheringCluster16x16 = OD_FOURCC(lit_C, lit_L, lit_1, lit_6) , kRescale = OD_FOURCC(lit_R, lit_S, lit_C, lit_L) , kRescaleBox = OD_FOURCC(lit_B, lit_O, lit_X, lit_ ) , kRescaleBicubic = OD_FOURCC(lit_B, lit_C, lit_B, lit_C) ,
  kRescaleBilinear = OD_FOURCC(lit_B, lit_L, lit_N, lit_R) , kRescaleBspline = OD_FOURCC(lit_B, lit_S, lit_P, lit_L) , kRescaleCatmullrom = OD_FOURCC(lit_C, lit_T, lit_M, lit_L) , kRescaleLanczos3 = OD_FOURCC(lit_L, lit_N, lit_C, lit_Z) ,
  kRescaleWidth = OD_FOURCC(lit_W, lit_D, lit_T, lit_H) , kRescaleHeight = OD_FOURCC(lit_H, lit_G, lit_H, lit_T) , kQuantizeNone = OD_FOURCC(lit_C, lit_T, lit_O, lit_8) , kQuantizeWU = OD_FOURCC(lit_W, lit_U, lit_C, lit_Q) ,
  kQuantizeNN = OD_FOURCC(lit_N, lit_N, lit_Q, lit_ ) , kQuantizeLFP = OD_FOURCC(lit_L, lit_F, lit_P, lit_Q)
}
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdRxRasterServices)
 
virtual OdGiRasterImagePtr loadRasterImage (const OdString &filename, const OdUInt32 *pFlagsChain=NULL)=0
 
virtual OdGiRasterImagePtr loadRasterImage (OdStreamBuf *pStreamBuf, const OdUInt32 *pFlagsChain=NULL)=0
 
virtual OdGiRasterImagePtr createRasterImage (void *pImp)
 
virtual bool saveRasterImage (const OdGiRasterImage *rasterImage, const OdString &filename, const OdUInt32 *pFlagsChain=NULL)=0
 
virtual bool saveRasterImage (const OdGiRasterImage *rasterImage, const OdString &filename, OdUInt32 type, const OdUInt32 *pFlagsChain=NULL)=0
 
virtual bool convertRasterImage (const OdGiRasterImage *pRaster, OdUInt32 type, OdStreamBuf *pStreamBuf, const OdUInt32 *pFlagsChain=NULL)=0
 
virtual bool convertRasterImage (OdStreamBuf *pSrcStream, OdStreamBuf *pDstStream, OdUInt32 type, const OdUInt32 *pFlagsChainSrc=NULL, const OdUInt32 *pFlagsChainDst=NULL)=0
 
virtual OdUInt32Array getRasterImageTypes () const =0
 
virtual bool isRasterImageTypeSupported (OdUInt32 type) const
 
virtual OdString mapTypeToExtension (OdUInt32 type, OdString *psFilterName) const =0
 
virtual OdUInt32 mapExtensionToType (const OdString &extension) const =0
 
virtual OdUInt32 getImageFormat (const OdString &filename) const =0
 
virtual OdUInt32 getImageFormat (OdStreamBuf *pStreamBuf) const =0
 
- Public Member Functions inherited from OdRxModule
 ODRX_DECLARE_MEMBERS (OdRxModule)
 
virtual voidsysData ()=0
 
virtual void deleteModule ()=0
 
virtual void initApp ()=0
 
virtual void uninitApp ()=0
 
virtual OdString moduleName () const =0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for classes that provide platform-dependent loading and saving of Raster Image files for Teigha. Library: TD_Db <group OdRx_Classes>

Definition at line 124 of file RxRasterServices.h.

Member Enumeration Documentation

◆ ImageType

Enumerator
kUnknown 
kBMP 
kICO 
kJPEG 
kJNG 
kKOALA 
kLBM 
kIFF 
kMNG 
kPBM 
kPBMRAW 
kPCD 
kPCX 
kPGM 
kPGMRAW 
kPNG 
kPPM 
kPPMRAW 
kRAS 
kTARGA 
kTIFF 
kWBMP 
kPSD 
kCUT 
kXBM 
kXPM 
kDDS 
kGIF 
kHDR 
kFAXG3 
kSGI 
kEXR 
kJ2K 
kJP2 
kPFM 
kPICT 
kRAW 

Definition at line 128 of file RxRasterServices.h.

◆ LoadFlags

Enumerator
kLoadFmt 
kNoTIFFRotation 

Definition at line 170 of file RxRasterServices.h.

◆ SaveFlags

Enumerator
kTransparentColor 
kJpegQuality 
kTiffCompression 
kTiffCompressionDeflate 
kTiffCompressionLzw 
kTiffCompressionJpeg 
kTiffCompressionCCITTFax3 
kTiffCompressionCCITTFax4 
kTiffCompressionEmbedded 
kDithering 
kDitheringFS 
kDitheringBayer4x4 
kDitheringBayer8x8 
kDitheringBayer16x16 
kDitheringCluster6x6 
kDitheringCluster8x8 
kDitheringCluster16x16 
kRescale 
kRescaleBox 
kRescaleBicubic 
kRescaleBilinear 
kRescaleBspline 
kRescaleCatmullrom 
kRescaleLanczos3 
kRescaleWidth 
kRescaleHeight 
kQuantizeNone 
kQuantizeWU 
kQuantizeNN 
kQuantizeLFP 

Definition at line 179 of file RxRasterServices.h.

Member Function Documentation

◆ convertRasterImage() [1/2]

virtual bool OdRxRasterServices::convertRasterImage ( const OdGiRasterImage pRaster,
OdUInt32  type,
OdStreamBuf pStreamBuf,
const OdUInt32 pFlagsChain = NULL 
)
pure virtual

Try to convert raster image (RGB) to JPEG or other type.

Parameters
pRaster[in] Raster image to be converted.
type[in] Image format type to be converted.
pStreamBuf[in] Pointer to the StreamBuf object to which the data are to be stored.
pFlagsChain[in] Optional zero-terminated saving flag pairs array.

◆ convertRasterImage() [2/2]

virtual bool OdRxRasterServices::convertRasterImage ( OdStreamBuf pSrcStream,
OdStreamBuf pDstStream,
OdUInt32  type,
const OdUInt32 pFlagsChainSrc = NULL,
const OdUInt32 pFlagsChainDst = NULL 
)
pure virtual

Try to convert raster image to other type.

Parameters
pSrcStream[in] Pointer to the StreamBuf object from which the data are to be converted.
pDstStream[in] Pointer to the StreamBuf object to which the data are to be converted.
type[in] Image format type to be converted.
pFlagsChainSrc[in] Optional zero-terminated loading flag pairs array.
pFlagsChainDst[in] Optional zero-terminated saving flag pairs array.

◆ createRasterImage()

virtual OdGiRasterImagePtr OdRxRasterServices::createRasterImage ( void pImp)
virtual

Create raster image using user-defined image implementation.

Parameters
pImp[in] User-defined raster image implementation.
Remarks
For default implementation always return null.

◆ getImageFormat() [1/2]

virtual OdUInt32 OdRxRasterServices::getImageFormat ( const OdString filename) const
pure virtual

Try to detect image format type from input stream.

Parameters
filename[in] Filename of the Raster Image file to be checked.

◆ getImageFormat() [2/2]

virtual OdUInt32 OdRxRasterServices::getImageFormat ( OdStreamBuf pStreamBuf) const
pure virtual

Try to detect image format type from input stream.

Parameters
pStreamBuf[in] Pointer to the StreamBuf object from which the data are to be checked.

◆ getRasterImageTypes()

virtual OdUInt32Array OdRxRasterServices::getRasterImageTypes ( ) const
pure virtual

Returns array of supported image format types.

◆ isRasterImageTypeSupported()

virtual bool OdRxRasterServices::isRasterImageTypeSupported ( OdUInt32  type) const
virtual

Checks does image format type is supported.

Parameters
type[in] Image format type to be checked.

◆ loadRasterImage() [1/2]

virtual OdGiRasterImagePtr OdRxRasterServices::loadRasterImage ( const OdString filename,
const OdUInt32 pFlagsChain = NULL 
)
pure virtual

Loads the specified Raster Image file.

Parameters
filename[in] Filename of the Raster Image file to be read.
pFlagsChain[in] Optional zero-terminated loading flag pairs array.
Remarks
The returned pointer is expected to be passed to OdGiViewportGeometry::rasterImageDc().

◆ loadRasterImage() [2/2]

virtual OdGiRasterImagePtr OdRxRasterServices::loadRasterImage ( OdStreamBuf pStreamBuf,
const OdUInt32 pFlagsChain = NULL 
)
pure virtual

Loads the specified Raster Image file.

Parameters
pStreamBuf[in] Pointer to the StreamBuf object from which the data are to be read.
pFlagsChain[in] Optional zero-terminated loading flag pairs array.
Remarks
The returned pointer is expected to be passed to OdGiViewportGeometry::rasterImageDc().

◆ mapExtensionToType()

virtual OdUInt32 OdRxRasterServices::mapExtensionToType ( const OdString extension) const
pure virtual

Get image format type by file extension.

Parameters
extension[in] File extension.

◆ mapTypeToExtension()

virtual OdString OdRxRasterServices::mapTypeToExtension ( OdUInt32  type,
OdString psFilterName 
) const
pure virtual

Get file extension and filter name by type.

Parameters
type[in] Image format type to be formatted.
psFilterName[out] Output filter name (can be Null).

◆ ODRX_DECLARE_MEMBERS()

OdRxRasterServices::ODRX_DECLARE_MEMBERS ( OdRxRasterServices  )

◆ saveRasterImage() [1/2]

virtual bool OdRxRasterServices::saveRasterImage ( const OdGiRasterImage rasterImage,
const OdString filename,
const OdUInt32 pFlagsChain = NULL 
)
pure virtual

Saves specified Raster Image to the specified file.

Parameters
rasterImage[in] Raster image to be saved.
filename[in] Filename of the Raster Image file to be written.
pFlagsChain[in] Optional zero-terminated saving flag pairs array.

◆ saveRasterImage() [2/2]

virtual bool OdRxRasterServices::saveRasterImage ( const OdGiRasterImage rasterImage,
const OdString filename,
OdUInt32  type,
const OdUInt32 pFlagsChain = NULL 
)
pure virtual

Saves specified Raster Image to the specified file.

Parameters
rasterImage[in] Raster image to be saved.
filename[in] Filename of the Raster Image file to be written.
type[in] Image format type to be written.
pFlagsChain[in] Optional zero-terminated saving flag pairs array.

The documentation for this class was generated from the following file: