Open CASCADE Technology 6.5.2
Public Member Functions | Protected Attributes
Image_PixMap Class Reference

This class defines a system-independent bitmap

#include <Image_PixMap.hxx>

Inheritance diagram for Image_PixMap:
Inheritance graph
[legend]

Public Member Functions

 Image_PixMap (const Standard_Integer theWidth, const Standard_Integer theHeight, const Image_TypeOfImage theType)
 Allocate the bitmap with requested dimensions.
Allowed image types:

 Image_PixMap (const Standard_PByte theDataPtr, const Standard_Integer theWidth, const Standard_Integer theHeight, const Standard_Integer thePitch, const Standard_Integer theBitsPerPixel, const Standard_Boolean theIsTopDown)
 Create a bitmap by copying an existing buffer.

virtual void Destroy ()
 Destroies the Bitmap

 ~Image_PixMap ()
virtual Standard_Boolean Dump (const Standard_CString theFilename, const Standard_Real theGammaCorr=1.0) const
 Dumps the Bitmap to an image file with
an optional gamma correction value
and returns TRUE if the dump occurs normaly.

virtual Aspect_Handle PixmapID () const
 Returns NULL handle

void AccessBuffer (Image_CRawBufferData &theBufferInfo) const
 Fill the structure for low-level access to the bitmap data.
It is up to you to interpret these bytes correctly!
Important notice: image stored upside-down in the memory,
first image row is an last scanline in
the memory buffer.
If image was created with type Image_TOI_FLOAT buffer
format will be set to TDepthComponent. You can override
this field with another one-channel buffer format because
it useless for bitmap definition.

virtual Quantity_Color PixelColor (const Standard_Integer theX, const Standard_Integer theY) const
 Returns the pixel color. This function is relatively slow,
use AccessBuffer() instead for stream operations.
Note that this function convert input theY coordinate
to count off from top of an image (while in memory it stored
upside-down).

Protected Attributes

Image_HPrivateImage myImage

Constructor & Destructor Documentation

Image_PixMap::Image_PixMap ( const Standard_Integer  theWidth,
const Standard_Integer  theHeight,
const Image_TypeOfImage  theType 
)
  • Image_TOI_RGB (color image, 1 byte per component);
  • Image_TOI_RGBA (color image with alpha channel);
  • Image_TOI_RGBF (color image, 1 float per component);
  • Image_TOI_RGBAF (color image with alpha channel);
  • Image_TOI_FLOAT (grey image, 1 float per pixel).
Image_PixMap::Image_PixMap ( const Standard_PByte  theDataPtr,
const Standard_Integer  theWidth,
const Standard_Integer  theHeight,
const Standard_Integer  thePitch,
const Standard_Integer  theBitsPerPixel,
const Standard_Boolean  theIsTopDown 
)
Image_PixMap::~Image_PixMap ( ) [inline]

Member Function Documentation

void Image_PixMap::AccessBuffer ( Image_CRawBufferData theBufferInfo) const
virtual void Image_PixMap::Destroy ( ) [virtual]

Implements Aspect_PixMap.

virtual Standard_Boolean Image_PixMap::Dump ( const Standard_CString  theFilename,
const Standard_Real  theGammaCorr = 1.0 
) const [virtual]

Implements Aspect_PixMap.

virtual Quantity_Color Image_PixMap::PixelColor ( const Standard_Integer  theX,
const Standard_Integer  theY 
) const [virtual]

Implements Aspect_PixMap.

virtual Aspect_Handle Image_PixMap::PixmapID ( ) const [virtual]

Implements Aspect_PixMap.


Field Documentation


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines