ImageConverterBuffer Class Reference

List of all members.

Detailed Description

Definition at line 66 of file kfbximageconverter.h.

Public Member Functions

bool IsValid ()
 Check if this object is correctly initialized.
bool UseDataBuffer ()
 Tells where the data to use is located.
int GetWidth ()
 Get the width of the image.
int GetHeight ()
 Get the height of the image.
int GetColorSpace ()
 Get the color space of the image.
char GetPixelSize ()
 Get the number of bytes per pixel.
kByteGetData ()
 Get access to the image data.
bool GetOriginalFormat ()
 Tells if the image has not been converted from its original format.
KString GetOriginalFileName ()
 Get the original filename of the image file before conversion.
void Init (int pWidth, int pHeight, bool pUseDataBuffer, int pColorSpace=ColorSpaceRGB, char pPixelSize=4)
 Initialize the object.
void SetOriginalFormat (bool pState)
 Set the original format flag.
void SetOriginalFileName (KString pFilename)
 Set the original filename string.


Member Function Documentation

bool IsValid (  )  [inline]

Check if this object is correctly initialized.

Returns:
true if the object has been initialized with acceptable values.

Definition at line 89 of file kfbximageconverter.h.

bool UseDataBuffer (  )  [inline]

Tells where the data to use is located.

Returns:
true if the data is in the allocated memory buffer. false if the data is from an external file on disk.

Definition at line 94 of file kfbximageconverter.h.

int GetWidth (  )  [inline]

Get the width of the image.

Returns:
The number of horizontal pixels.

Definition at line 99 of file kfbximageconverter.h.

int GetHeight (  )  [inline]

Get the height of the image.

Returns:
The number of vertical pixels.

Definition at line 104 of file kfbximageconverter.h.

int GetColorSpace (  )  [inline]

Get the color space of the image.

Returns:
Either ColorSpaceRGB or ColorSpaceYUV.

Definition at line 109 of file kfbximageconverter.h.

char GetPixelSize (  )  [inline]

Get the number of bytes per pixel.

Returns:
Either 3 for RGB images, or 4 for RGBA images.

Definition at line 114 of file kfbximageconverter.h.

kByte* GetData (  )  [inline]

Get access to the image data.

Returns:
Pointer to the array of pixels.

Definition at line 119 of file kfbximageconverter.h.

bool GetOriginalFormat (  )  [inline]

Tells if the image has not been converted from its original format.

Returns:
true if the image is stored in its original format, false if the image has been converted.

Definition at line 124 of file kfbximageconverter.h.

KString GetOriginalFileName (  )  [inline]

Get the original filename of the image file before conversion.

Returns:
The original filename.
Remarks:
When a conversion to another format occurs, the converted image is given a different filename. The original filename can be stored in the FBX file so that the original file can be extracted from the converted image (also stored in the FBX file).

Definition at line 132 of file kfbximageconverter.h.

void Init ( int  pWidth,
int  pHeight,
bool  pUseDataBuffer,
int  pColorSpace = ColorSpaceRGB,
char  pPixelSize = 4 
)

Initialize the object.

Parameters:
pWidth Image width.
pHeight Image height.
pUseDataBuffer Set to true if the image buffer needs to be allocated.
pColorSpace The image color space.
pPixelSize The number of bytes per pixel.
Remarks:
The total number of bytes allocated (if the pUseDataBuffer is true) is: total = pWidth * pHeight * pPixelSize

void SetOriginalFormat ( bool  pState  ) 

Set the original format flag.

Parameters:
pState The value of the original format flag.

void SetOriginalFileName ( KString  pFilename  ) 

Set the original filename string.

Parameters:
pFilename The filename to use.