Public Member Functions | Public Attributes

FBImage Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, Utility Classes.


Search for all occurrences

Detailed Description

Image class.

Utility class used to load and get manipulate image data from disk or memory.

Definition at line 104 of file fbimage.h.

#include <fbimage.h>

Inheritance diagram for FBImage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBImage (const char *pFileName, HIObject pObject=NULL)
 Constructor.
virtual void FBDelete ()
 Virtual FBDelete function.
void Cleanup ()
 Cleanup image data, making it black.
bool Init (FBImageFormat pFormat, int pWidth, int pHeight)
 Init.
K_DEPRECATED_2014 unsigned char * GetDataBuffer ()
 Access image data buffer, allow modifications.
unsigned char * GetBufferAddress ()
 Access image data buffer, allow modifications.
bool ConvertFormat (FBImageFormat pNewFormat)
 Convert the image data format to another format.
bool ConvertSize (int pWidth, int pHeight)
 Convert the image size.
void VerticalFlip ()
 Flip the image vertically.
bool WriteToTif (const char *pFileName, const char *pComments, bool pCompressed)
 Write image data to a TIF file on disk.
bool IsCompressedTif (const char *pFileName)
 Query TIF file about its compressed status.

Public Attributes

FBPropertyInt Width
 Read Write Property: Width of the image in pixels.
FBPropertyInt Height
 Read Write Property: Height of the image in pixels.
FBPropertyInt Depth
 Read Write Property: Color depth of the image.
FBPropertyImageFormat Format
 Read Write Property: Image data format.
FBPropertyImageType Type
 Read Only Property: Image type, refering to either frame or field.
FBPropertyImageInterleaveType InterleaveType
 Read Only Property: Image interleave type.
FBPropertyImageInterpolationType InterpolationType
 Read Only Property: Image interpolation type.

Constructor & Destructor Documentation

FBImage ( const char *  pFileName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pFileNamePath to the image file. If pObject is not NULL, pFileName will be ignored.
pObjectFor internal use only.

Member Function Documentation

virtual void FBDelete ( ) [virtual]

Virtual FBDelete function.

Reimplemented from FBComponent.

void Cleanup ( )

Cleanup image data, making it black.

bool Init ( FBImageFormat  pFormat,
int  pWidth,
int  pHeight 
)

Init.

Parameters:
pFormatImage format used to initialize data buffer.
pWidthImage width in pixels.
pHeightImage height in pixels.
K_DEPRECATED_2014 unsigned char* GetDataBuffer ( )

Access image data buffer, allow modifications.

Deprecated:
for naming consistence purpose, use GetBufferAddress() instead.
Returns:
Pointer to the image data, values ranging from 0 to 255.
unsigned char* GetBufferAddress ( )

Access image data buffer, allow modifications.

Returns:
Pointer to the image data, values ranging from 0 to 255.
bool ConvertFormat ( FBImageFormat  pNewFormat)

Convert the image data format to another format.

Parameters:
pNewFormatThe new format to convert the image to.
Returns:
Return true if the convert was successful.
bool ConvertSize ( int  pWidth,
int  pHeight 
)

Convert the image size.

Parameters:
pWidthNew width of the image.
pHeightNew height of the image.
Returns:
Return true if the convert was successful.
void VerticalFlip ( )

Flip the image vertically.

bool WriteToTif ( const char *  pFileName,
const char *  pComments,
bool  pCompressed 
)

Write image data to a TIF file on disk.

Parameters:
pFileNameFull TIF file path name of the file to write.
pCommentsComments appended to the TIF file.
pCompressedIf true, the image data in the file will be compressed.
Returns:
Return true if the image was successfully written on disk.
bool IsCompressedTif ( const char *  pFileName)

Query TIF file about its compressed status.

Parameters:
pFileNameFull TIF file path name of the file to query.
Returns:
Return true if the TIF file image data is compressed.

Member Data Documentation

Read Write Property: Width of the image in pixels.

Definition at line 176 of file fbimage.h.

Read Write Property: Height of the image in pixels.

Definition at line 177 of file fbimage.h.

Read Write Property: Color depth of the image.

Definition at line 178 of file fbimage.h.

FBPropertyImageFormat Format

Read Write Property: Image data format.

Definition at line 179 of file fbimage.h.

FBPropertyImageType Type

Read Only Property: Image type, refering to either frame or field.

Definition at line 180 of file fbimage.h.

FBPropertyImageInterleaveType InterleaveType

Read Only Property: Image interleave type.

Only meaningful if image type is field.

Definition at line 181 of file fbimage.h.

FBPropertyImageInterpolationType InterpolationType

Read Only Property: Image interpolation type.

Definition at line 182 of file fbimage.h.


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

FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage
FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage FBImage