FxImage

Superclass:
Declared In:

Introduction

The parent class of FxBitmap and FxTexture.



Methods

-bytes
Return the number of bytes per pixel component.
-colorInfo
Returns the color properties of the image
-containsPointX:Y:
Checks whether the x,y position lies within the image bounds.
-depth
Returns the depth of the image in bits per pixel.
-field
Returns the field identifier of the image.
-fieldOrder
Returns the field order of the image stream
-height
Returns the height of the image.
-imageInfo
Returns the FxImageInfo structure that describes the image.
-imageType
Returns the type of the image.
-initWithInfo:
Initializes the FxImage with the given FxImageInfo.
-isPremultiplied
Indicates whether the image's RGB values are premultiplied by its Alpha values.
-numActiveChannels
Returns the number of active channels.
-origin
Returns the orientation of the image.
-pixelAspect
Returns the pixel aspect ratio of the image.
-pixelFormat
Returns the pixel format of the image.
-setBytes:
Sets the number of bytes per pixel component.
-setDepth:
Sets the the depth of the image in bits per pixel.
-setField:
Sets the field identifier of the image.
-setFieldOrder:
Sets the field order of the image stream.
-setHeight:
Sets the height of the image.
-setImageType:
Sets the type of the image.
-setIsPremultiplied:
Sets the premultiplied flag for the image.
-setNumActiveChannels:
Sets the number of active channels in the image.
-setOrigin:
Sets the orientation of the image.
-setPixelAspect:
Sets the pixel aspect ratio of the image.
-setPixelFormat:
Sets the pixel format of the image.
-setWidth:
Sets the width of the image.
-setWidth:andHeight:
Sets both the width and height of the image.
-size
Returns the size of the image.
-width
Returns the width of the image.

bytes


Return the number of bytes per pixel component.

- (UInt32)bytes; 
Discussion

Returns 1 (8 bits), 2 (16 bits), or 4 (32 bits).


colorInfo


Returns the color properties of the image

- (FxImageColorInfo)colorInfo; 
Discussion

This method was introduced in FxPlug 1.2.2. You should check to see if it is implemented before calling it: if ( [theFxImage respondsToSelector:@selector(colorInfo)] )


containsPointX:Y:


Checks whether the x,y position lies within the image bounds.

- (BOOL)containsPointX:(int)x Y:(int)y; 
Parameters
x
The horizontal position
y
The vertical position
Return Value

Returns YES if the position lies in the image bounds; NO otherwise.


depth


Returns the depth of the image in bits per pixel.

- (UInt32)depth; 
Return Value

The depth of the image.


field


Returns the field identifier of the image.

- (FxField)field; 
Return Value

The field identifier of the image (kFxField_NONE, kFxField_UPPER, or kFxField_LOWER).

Discussion

This method was introduced in FxPlug 1.2. You should check to see if it is implemented before calling it: if ( [theFxImage respondsToSelector:@selector(field)] )


fieldOrder


Returns the field order of the image stream

- (FxFieldOrder)fieldOrder; 
Return Value

The field order (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_UPPER_FIRST, or kFxFieldOrder_LOWER_FIRST).

Discussion

This method was introduced in FxPlug 1.2. You should check to see if it is implemented before calling it: if ( [theFxImage respondsToSelector:@selector(fieldOrder)] )


height


Returns the height of the image.

- (UInt32)height; 
Return Value

The height of the image in pixels.


imageInfo


Returns the FxImageInfo structure that describes the image.

- (FxImageInfo)imageInfo; 
Return Value

The FxImageInfo structure.


imageType


Returns the type of the image.

- (FxImageType)imageType; 
Return Value

The type of the image (i.e., kFxImageType_BITMAP or kFxImageType_TEXTURE).


initWithInfo:


Initializes the FxImage with the given FxImageInfo.

- (id)initWithInfo:(FxImageInfo)imageInfo; 
Parameters
imageInfo
The FxImageInfo structure.
Return Value

The initialized FxImage object.

Discussion

FxImage is an abstract base class. You should never directly allocate an FxImage, but should allocate one of its subclasses (FxBitmap or FxTexture) instead. Sending this method to an FxImage (as opposed to an FxBitmap or FxTexture) raises an exception.


isPremultiplied


Indicates whether the image's RGB values are premultiplied by its Alpha values.

- (BOOL)isPremultiplied; 
Return Value

YES if premultiplied; NO otherwise.


numActiveChannels


Returns the number of active channels.

- (UInt32)numActiveChannels; 
Return Value

The number of active channels.

Discussion

For example, an ARGB image would return a value of 4.


origin


Returns the orientation of the image.

- (FxImageOrigin)origin; 
Return Value

The FxImageOrigin value (kFxImageOrigin_BOTTOM_LEFT or kFxImageOrigin_TOP_LEFT).

Discussion

The image origin value defines whether the Y axis increases upwardly or downwardly.


pixelAspect


Returns the pixel aspect ratio of the image.

- (double)pixelAspect; 
Return Value

The pixel aspect ratio of the image. For example, this method returns 0.9 for an NTSC DV image.


pixelFormat


Returns the pixel format of the image.

- (FxPixelFormat)pixelFormat; 
Return Value

The FxPixelFormat value.


setBytes:


Sets the number of bytes per pixel component.

- (void)setBytes:(UInt32)bytes; 
Parameters
bytes
The new "bytes" value.
Discussion

Valid values are 1 (8 bits), 2 (16 bits), or 4 (32 bits).


setDepth:


Sets the the depth of the image in bits per pixel.

- (void)setDepth:(UInt32)depth; 
Parameters
depth
The new depth value.


setField:


Sets the field identifier of the image.

- (void)setField:(FxField)field; 
Parameters
field
The field identifier of the image (kFxField_NONE, kFxField_UPPER, or kFxField_LOWER).
Discussion

This method was introduced in FxPlug 1.2. You should check to see if it is implemented before calling it: if ( [theFxImage respondsToSelector:@selector(setField:)] )


setFieldOrder:


Sets the field order of the image stream.

- (void)setFieldOrder:(FxFieldOrder)fieldOrder; 
Parameters
fieldOrder
The field order of the image stream (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_UPPER_FIRST, or kFxFieldOrder_LOWER_FIRST).
Discussion

This method was introduced in FxPlug 1.2. You should check to see if it is implemented before calling it: if ( [theFxImage respondsToSelector:@selector(setFieldOrder:)] )


setHeight:


Sets the height of the image.

- (void)setHeight:(UInt32)height; 
Parameters
height
The new height value in pixels.


setImageType:


Sets the type of the image.

- (void)setImageType:(FxImageType)type; 
Parameters
type
The new FxImageType value (kFxImageType_BITMAP or kFxImageType_TEXTURE).


setIsPremultiplied:


Sets the premultiplied flag for the image.

- (void)setIsPremultiplied:(BOOL)isPremult; 
Parameters
isPremult
The new isPremultiplied value.


setNumActiveChannels:


Sets the number of active channels in the image.

- (void)setNumActiveChannels:(UInt32)channels; 
Parameters
channels
The new channels value.


setOrigin:


Sets the orientation of the image.

- (void)setOrigin:(FxImageOrigin)origin; 
Parameters
origin
The new FxImageOrigin value (kFxImageOrigin_BOTTOM_LEFT or kFxImageOrigin_TOP_LEFT).
Discussion

The image origin value defines whether the Y axis increases upwardly or downwardly.


setPixelAspect:


Sets the pixel aspect ratio of the image.

- (void)setPixelAspect:(double)aspectRatio; 
Parameters
aspectRatio
The new aspect ratio value.


setPixelFormat:


Sets the pixel format of the image.

- (void)setPixelFormat:(FxPixelFormat)pixelFormat; 
Parameters
pixelFormat
The new FxPixelFormat value.


setWidth:


Sets the width of the image.

- (void)setWidth:(UInt32)width; 
Parameters
width
The new width value in pixels.


setWidth:andHeight:


Sets both the width and height of the image.

- (void)setWidth:(UInt32)width andHeight:(UInt32)height; 
Parameters
width
The new width value in pixels.
height
The new height value in pixels.


size


Returns the size of the image.

- (UInt32)size; 
Return Value

Size of the image in bytes.

Discussion

This method is only valid for 32-bpp (8-bit integer components) ARGB images.


width


Returns the width of the image.

- (UInt32)width; 
Return Value

The width of the image in pixels.

Did this document help you? Yes It's good, but... Not helpful...
Last Updated: 2009-04-14