ImageConverterBuffer
#include<kfbximageconverter.h>

List of all members.

Detailed Description

image converter buffer

Definition at line69of filekfbximageconverter.h.


Constructor and Destructor.

 ImageConverterBuffer()
 Constructor.
 ~ImageConverterBuffer()
 Destructor.

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.
kByte * GetData()
 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(KStringpFilename)
 Set the original filename string.

Constructor&Destructor Documentation

Constructor.

Destructor.

Member Function Documentation

bool IsValid( ) [inline]

Check if this object is correctly initialized.

Returns:
trueif the object has been initialized with acceptable values.

Definition at line100of filekfbximageconverter.h.

bool UseDataBuffer( ) [inline]

Tells where the data to use is located.

Returns:
trueif the data is in the allocated memory buffer.falseif the data is from an external file on disk.

Definition at line105of filekfbximageconverter.h.

int GetWidth( ) [inline]

Get the width of the image.

Returns:
The number of horizontal pixels.

Definition at line110of filekfbximageconverter.h.

int GetHeight( ) [inline]

Get the height of the image.

Returns:
The number of vertical pixels.

Definition at line115of filekfbximageconverter.h.

int GetColorSpace( ) [inline]

Get the color space of the image.

Returns:
Either ColorSpaceRGB or ColorSpaceYUV.

Definition at line120of filekfbximageconverter.h.

char GetPixelSize( ) [inline]

Get the number of bytes per pixel.

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

Definition at line125of filekfbximageconverter.h.

kByte* GetData( ) [inline]

Get access to the image data.

Returns:
Pointer to the array of pixels.

Definition at line130of filekfbximageconverter.h.

bool GetOriginalFormat( ) [inline]

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

Returns:
trueif the image is stored in its original format,falseif the image has been converted.

Definition at line135of filekfbximageconverter.h.

KStringGetOriginalFileName( ) [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 line143of filekfbximageconverter.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 totrueif 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 istrue) 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.