Main Page | Modules | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages | Search

vvxtrImage Class Reference
[Ocrxtrapi_public]

An encapsulation of information about a bitmap. More...

#include <vvxtrAPI.h>

List of all members.

Public Member Functions

 vvxtrImage ()
 Constructor.

void SetWidth (unsigned int width)
 Set the image width.

void SetHeight (unsigned int height)
 Set the image height.

void SetBytesPerLine (unsigned int bpl)
 Set the bytes per line of the image.

void SetXDPI (unsigned short int xdpi)
 Set the horizontal DPI of the image.

void SetYDPI (unsigned short int ydpi)
 Set the vertical DPI of the image.

void SetBitsPerPixel (unsigned short int bpp)
 Set the bits per pixel of the image.

void SetBitsPerSample (unsigned short int bps)
 Set the bits per sample of the image.

void SetData (unsigned char *imgData)
 Set the location of the bitmap data.

unsigned int GetWidth ()
 Get the current image width.

unsigned int GetHeight ()
 Get the current image height.

unsigned int GetBytesPerLine ()
 Get the number of bytes per line.

unsigned short int GetXDPI ()
 Get the horizontal bit density.

unsigned short int GetYDPI ()
 Get the vertical dot density.

unsigned short int GetBitsPerPixel ()
 Get the number of bits per pixel.

unsigned short int GetBitsPerSample ()
 Get the bits per sample of the image.

unsigned char * GetData ()
 Get a pointer to the raw data.

const unsigned char * GetData () const
int GetImageSize () const
 Get the total image size.

int GetTotalSize () const
 Get the total size, including the size of this structure.


Static Public Member Functions

vvxtrImageFromRaw (void *rawbuffer)
 A vvxtrImage factory that creates a vvxtrImage instance in-place in a raw data buffer.


Protected Attributes

int size
 Size of the image header.

unsigned int dwImgWidth
 image width in pixels

unsigned int dwImgHeight
 image height in pixels

unsigned int dwBytesPerLine
 number of data bytes per X scanline

unsigned short int wXDPI
 resolution in pixels of X scanline data

unsigned short int wYDPI
 resolution in pixels of Y scanline data

unsigned short int chBitsPerPixel
 image depth (1, 4, 8, 24)

unsigned short int wBitsPerSample
 image bits per sample (1, 8)

unsigned char * data
 image data


Detailed Description

An encapsulation of information about a bitmap.

The image header sent along with memory resident bitmaps.

The image needs to be in a chunky (i.e. not planar) form, at 1, 8, or 24 bits per pixel. 8-bit is for grayscale only.

As dictated by general conventions, 1-bit black and white image data should have a photometric interpretation of min-is-white, while 8 and 24-bit image data should have a photometric interpretation of min-is-black.

Any line padding in the image data should be handled by setting the bytes per line correctly.

The destructor does not delete the data, as this class does not own the data.

See also:
vvEngAPI::vvReadImageData(const struct vvxtrImage * img)

Definition at line 1280 of file vvxtrAPI.h.


Constructor & Destructor Documentation

vvxtrImage::vvxtrImage  )  [inline]
 

Constructor.

Definition at line 1287 of file vvxtrAPI.h.

References size.


Member Function Documentation

vvxtrImage* vvxtrImage::FromRaw void *  rawbuffer  )  [inline, static]
 

A vvxtrImage factory that creates a vvxtrImage instance in-place in a raw data buffer.

Used to encapsulate a vvxtrImage with the raw bitmap data in one contiguous buffer, which could be used, for example, to transmit the data in one block.

This function is primarily for internal use; if its purpose is not clear to you, then you probably don't need to use it.

Parameters:
rawbuffer Pointer to the data buffer, which must be at least sizeof(vvxtrImage)+sizeof(targetimage)
Returns:
A pointer to the initialized memory region.

Definition at line 1424 of file vvxtrAPI.h.

References SetData().

Referenced by outputImg().

unsigned short int vvxtrImage::GetBitsPerPixel  )  [inline]
 

Get the number of bits per pixel.

Returns:
Bits per pixel.

Definition at line 1379 of file vvxtrAPI.h.

References chBitsPerPixel.

unsigned short int vvxtrImage::GetBitsPerSample  )  [inline]
 

Get the bits per sample of the image.

Returns:
Bits per sample.
See also:
SetBitsPerSample

Definition at line 1386 of file vvxtrAPI.h.

References wBitsPerSample.

unsigned int vvxtrImage::GetBytesPerLine  )  [inline]
 

Get the number of bytes per line.

Returns:
Bytes per line.

Definition at line 1361 of file vvxtrAPI.h.

References dwBytesPerLine.

unsigned char* vvxtrImage::GetData  )  [inline]
 

Get a pointer to the raw data.

Returns:
Raw data pointer.

Definition at line 1393 of file vvxtrAPI.h.

References data.

unsigned int vvxtrImage::GetHeight  )  [inline]
 

Get the current image height.

Returns:
Image height in pixels.

Definition at line 1355 of file vvxtrAPI.h.

References dwImgHeight.

int vvxtrImage::GetImageSize  )  const [inline]
 

Get the total image size.

Returns:
Image size in bytes.

Definition at line 1401 of file vvxtrAPI.h.

References dwBytesPerLine, and dwImgHeight.

Referenced by GetTotalSize().

int vvxtrImage::GetTotalSize  )  const [inline]
 

Get the total size, including the size of this structure.

Used to allocate a buffer that includes this structure embedded at the start.

Returns:
sizeof(vvxtrImage)+GetImageSize()

Definition at line 1408 of file vvxtrAPI.h.

References GetImageSize().

unsigned int vvxtrImage::GetWidth  )  [inline]
 

Get the current image width.

Returns:
Image width in pixels.

Definition at line 1349 of file vvxtrAPI.h.

References dwImgWidth.

unsigned short int vvxtrImage::GetXDPI  )  [inline]
 

Get the horizontal bit density.

Returns:
Number of horizontal dots per inch.

Definition at line 1367 of file vvxtrAPI.h.

References wXDPI.

unsigned short int vvxtrImage::GetYDPI  )  [inline]
 

Get the vertical dot density.

Returns:
Number of vertical dots per inch.

Definition at line 1373 of file vvxtrAPI.h.

References wYDPI.

void vvxtrImage::SetBitsPerPixel unsigned short int  bpp  )  [inline]
 

Set the bits per pixel of the image.

Parameters:
bpp Bits per pixel

Definition at line 1328 of file vvxtrAPI.h.

References chBitsPerPixel.

void vvxtrImage::SetBitsPerSample unsigned short int  bps  )  [inline]
 

Set the bits per sample of the image.

Parameters:
bps Number of bits in each sample (i.e., in an RGB image, the number of bits in each of Red, Green, and Blue, so for a 24-bit RGB image, bits-per-sample would be 8)

Definition at line 1336 of file vvxtrAPI.h.

References wBitsPerSample.

void vvxtrImage::SetBytesPerLine unsigned int  bpl  )  [inline]
 

Set the bytes per line of the image.

Parameters:
bpl Bytes per line (width * bytes-per-pixel + bytes-between-lines)

Definition at line 1308 of file vvxtrAPI.h.

References dwBytesPerLine.

void vvxtrImage::SetData unsigned char *  imgData  )  [inline]
 

Set the location of the bitmap data.

Parameters:
imgData A pointer to the start of the raw bitmap data.

Definition at line 1342 of file vvxtrAPI.h.

References data.

Referenced by FromRaw().

void vvxtrImage::SetHeight unsigned int  height  )  [inline]
 

Set the image height.

Parameters:
height Height in pixels.

Definition at line 1301 of file vvxtrAPI.h.

References dwImgHeight.

void vvxtrImage::SetWidth unsigned int  width  )  [inline]
 

Set the image width.

Parameters:
width Width in pixels.

Definition at line 1295 of file vvxtrAPI.h.

References dwImgWidth.

void vvxtrImage::SetXDPI unsigned short int  xdpi  )  [inline]
 

Set the horizontal DPI of the image.

Parameters:
xdpi Dots per inch horizontally.

Definition at line 1315 of file vvxtrAPI.h.

References wXDPI.

void vvxtrImage::SetYDPI unsigned short int  ydpi  )  [inline]
 

Set the vertical DPI of the image.

Parameters:
ydpi Dots per inch vertically.

Definition at line 1322 of file vvxtrAPI.h.

References wYDPI.


The documentation for this class was generated from the following file:
Generated on Thu Dec 11 09:32:25 2003 for OCR Shop XTR/API User Documentation by doxygen 1.3.2