ADC Home > Reference Library > Reference > Apple Applications > Final Cut Pro/Final Cut Express > FxPlug Reference

 


FxImage.h

Introduction

Defines the FxImage class.



Classes

FxImage
The parent class of FxBitmap and FxTexture.


Typedefs


FxImageInfo


Structure that defines the parameters of an image.

typedef struct { 
    UInt32 width; 
    UInt32 height; 
    UInt32 depth; 
    UInt32 activeChannels; 
    FxImageType imageType; 
    FxImageOrigin origin; 
    FxPixelFormat pixelFormat; 
    BOOL isPremultiplied; 
    double pixelAspect; 
} FxImageInfo;  
Fields
width
The width of the image in pixels.
height
The height of the image in pixels.
depth
The depth of each pixel component. Must be 8 for UInt8, 16 for float 16, or 32 for float 32.
activeChannels
The number of channels in the image. Should always be 4.
imageType
The type (bitmap or texture) of the image.
origin
The orientation of the image's coordinate system (top-down or bottom-up).
pixelFormat
The format of each pixel (ARGB, RGBA, r408, or r4fl).
isPremultiplied
YES if the RGB values are premultiplied by the alpha. Should always be YES.
pixelAspect
The ratio of the width of each pixel to its height (e.g. 1.0 = Square Pixel, 0.9 = NTSC DV, etc.).
Discussion

The FxImageInfo structure describes an image and is used to create a new image. If the pixelFormat is kFxImageType_R408, then the depth must be 8. If kFxImageType_R4fl, then the depth must be 32.

Enumerations


FxImageColorInfo


enum { 
    kFxImageColorInfo_RGB_LINEAR = 0, 
    kFxImageColorInfo_RGB_GAMMA_DEFAULT_MACINTOSH_DISPLAY, 
    kFxImageColorInfo_RGB_GAMMA_VIDEO, 
    kFxImageColorInfo_YCbCr_R601, 
    kFXImageColorInfo_YCbCr_R709 
};  
Constants
kFxImageColorInfo_RGB_LINEAR
RGB linear (not gamma corrected)
kFxImageColorInfo_RGB_GAMMA_DEFAULT_MACINTOSH_DISPLAY
RGB at the default gamma for Macintosh displays (1.8)
kFxImageColorInfo_RGB_GAMMA_VIDEO
RGB at video gamma (2.2)
kFxImageColorInfo_YCbCr_R601
YCbCr with Rec. 601 color matrix and gamma curve
KFXImageColorInfo_YCbCr_R709
YCbCr with Rec. 709 color matrix and gamma curve
Discussion

Identifies some color properties of an FxImage. These include the color space, gamma level, and, in the case of YCbCr images, the color matrix for conversion to RGB.


FxImageOrigin


enum { 
    kFxImageOrigin_BOTTOM_LEFT = 0, 
    kFxImageOrigin_TOP_LEFT = 2 
};  
Constants
kFxImageOrigin_BOTTOM_LEFT
Right-handed "bottom-up" coordinate system where Y values increase upwardly.
kFxImageOrigin_TOP_LEFT
Left-handed "top-down" coordinate system where Y values increase downwardly.
Discussion

Identifies the orientation of an image's coordinate system. Images in Motion have a bottom-left origin. Images in Final Cut have a top-left origin.


FxImageType


enum { 
    kFxImageType_UNKNOWN = 0, 
    kFxImageType_BITMAP = 1, 
    kFxImageType_TEXTURE = 2 
};  
Constants
kFxImageType_UNKNOWN
Unknown image type. (You should never encounter this.)
kFxImageType_BITMAP
RAM-based bitmap image.
kFxImageType_TEXTURE
OpenGL-based texture image.
Discussion

Identifies the type of an image.


FxPixelFormat


enum { 
    kFxPixelFormat_RGBA = 0, 
    kFxPixelFormat_ARGB = 2, 
    kFxPixelFormat_R408 = 4, 
    kFxPixelFormat_R4fl = 5 
};  
Constants
kFxPixelFormat_RGBA
RGB+A pixels with component order R,G,B,A.
kFxPixelFormat_ARGB
RGB+A pixels with component order A,R,G,B.
kFxPixelFormat_R408
8-bit YUV+A pixels with component order A,Y,U,V in the 'r408' format.
kFxPixelFormat_R4fl
32-bit float YUV+A pixels with component order A,Y,U,V, in the 'r4fl' format.
Discussion

Identifies the format of the pixels for an image.

NOTES:

The r408 pixel format is only valid if the depth is 8 bits. The r4fl pixel format is only valid if the depth is 32 bits.

An FxPlug will only be given YUV pixels if it has declared that it supports either the r408 or r4fl compatible.

The r408 and r4fl formats are detailed in Letters from the Ice Floe #27 on the Apple Developer website.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-06-05