Python Reference Guide
 
Loading...
Searching...
No Matches
FBImage Class Reference

Image class. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBImage:

Public Member Functions

 FBImage (str pFileName)
 Constructor.
 
 Cleanup ()
 Cleanup image data, making it black.
 
bool ConvertFormat (FBImageFormat pNewFormat)
 Convert the image data format to another format.
 
bool ConvertSize (int pWidth, int pHeight)
 Convert the image size.
 
 FBDelete ()
 Virtual FBDelete function.
 
unsigned char GetBufferAddress ()
 Access image data buffer, allow modifications.
 
bool Init (FBImageFormat pFormat, int pWidth, int pHeight)
 Init.
 
K_DEPRECATED_2024 bool IsCompressedTif (str pFileName)
 Query TIF file about its compressed status.
 
 VerticalFlip ()
 Flip the image vertically.
 
bool WriteToDisk (str pFileName, str pComments, int pQuality, int pCompressionType)
 Write image data to a file on disk.
 
K_DEPRECATED_2024 bool WriteToTif (str pFileName, str pComments, bool pCompressed)
 Write image data to a TIF file on disk.
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor.
 
str ClassName ()
 Get the class name.
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags.
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags.
 
bool FBCreate ()
 Open Reality Creation function.
 
 FBDelete ()
 Open Reality deletion function.
 
 FBDestroy ()
 Open Reality destruction function.
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated).
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled.
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object.
 
 HardSelect ()
 HardSelect.
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled.
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId.
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy.
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace.
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager.
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager.
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property.
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading.
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager.
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags.
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status.
 

Public Attributes

int Depth
 Read Write Property: Color depth of the image.

 
FBImageFormat Format
 Read Write Property: Image data format.

 
int Height
 Read Write Property: Height of the image in pixels.

 
FBImageInterleaveType InterleaveType
 Read Only Property: Image interleave type. Only meaningful if image type is field.

 
FBImageInterpolationType InterpolationType
 Read Only Property: Image interpolation type.

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

 
int Width
 Read Write Property: Width of the image in pixels.

 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.

 
str LongName
 Read Write Property: Name and namespace for object.

 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py.
 
FBListComponent Parents
 List: Parents.

 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.

 
bool Selected
 Read Write Property: Selected property.

 
int TypeInfo
 Contains the Type information of the object.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

Detailed Description

Image class.


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

See sample: VideoMemory.py.

Constructor & Destructor Documentation

◆ FBImage()

FBImage ( str  pFileName)

Constructor.

Parameters
pFileNamePath to the image file. If pObject is not NULL, pFileName will be ignored.

Member Function Documentation

◆ Cleanup()

Cleanup ( )

Cleanup image data, making it black.

◆ ConvertFormat()

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.

◆ ConvertSize()

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.

◆ FBDelete()

FBDelete ( )

Virtual FBDelete function.

See sample: DeleteHierarchy.py.

◆ GetBufferAddress()

unsigned char GetBufferAddress ( )

Access image data buffer, allow modifications.

Returns
Pointer to the image data, values ranging from 0 to 255.

◆ Init()

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.

◆ IsCompressedTif()

K_DEPRECATED_2024 bool IsCompressedTif ( str  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.

◆ VerticalFlip()

VerticalFlip ( )

Flip the image vertically.

◆ WriteToDisk()

bool WriteToDisk ( str  pFileName,
str  pComments,
int  pQuality,
int  pCompressionType 
)

Write image data to a file on disk.

The image format used is determined by the file extension of the given filename.

Parameters
pFileNameFull file path name of the image file to write.
pCommentsComments appended to the file for image formats that support it.
pQualityQuality of the image for image formats that support it. Depends on the image format. For "jpeg": 0-100 where 0=(low visual quality, high compression), 100=(high visual quality, low compression).
pCompressionTypeCompression type of image for image formats that support it. Depends on the image format. For "tif": 0 = ( no compression ), 1 = ( LZW-compression ).
Returns
Return true if the image was successfully written on disk.

◆ WriteToTif()

K_DEPRECATED_2024 bool WriteToTif ( str  pFileName,
str  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.

Member Data Documentation

◆ Depth

int Depth

Read Write Property: Color depth of the image.

◆ Format

FBImageFormat Format

Read Write Property: Image data format.

◆ Height

int Height

Read Write Property: Height of the image in pixels.

◆ InterleaveType

FBImageInterleaveType InterleaveType

Read Only Property: Image interleave type. Only meaningful if image type is field.

◆ InterpolationType

FBImageInterpolationType InterpolationType

Read Only Property: Image interpolation type.

◆ Type

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

◆ Width

int Width

Read Write Property: Width of the image in pixels.