< Previous | Contents | Next >

Image Attributes

The following attributes can be used when creating a new Image using the Constructor function.


Name

Description

IMG_Like

Set the IMG_Like attribute to an already existing image to copy that image’s attributes to the new image.

IMG_CopyChannels

Set this to false to create an Image with different channels than the IMG_Like Image. Use IMG_Channel to then specify the channels the new Image should contain. If no channels are specified, a 4 channel (RGBA) Image will be created.

IMG_CopyChannelsAux

If set to false, allows you to use IMG_Like but discard the aux channel configuration.

IMG_Height

Set the IMG_Height attribute to an integer value representing the actual height of the image in pixels.

IMG_XScale

Set the IMG_XScale to a numeric value representing the X aspect of the image. For an NTSC D1 format image the value would be 0.9, for example.

IMG_YScale

Set the IMG_YScale to a numeric value representing the Y aspect of the image. For an NTSC D1 format image the value would be 1.0, for example.


Name

Description

IMAT_OriginalWidth

Set the IMAT_OriginalWidth to the original width of the image in pixels. When a composition is in Proxy mode, it is possible that

IMG_Width and IMG_Height will differ from the IMAT_OriginalWidth and IMAT_OriginalHeight values.

IMAT_OriginalHeight

Set the IMAT_OriginalHeight to the original height of the image in pixels. When a composition is in Proxy mode, it is possible that

IMG_Width and IMG_Height will differ from the IMAT_OriginalWidth and IMAT_OriginalHeight values.

IMG_Depth

Set the IMG_Depth attribute to match the image depth desired for the image. This will be an integer value, using the following table :

1 - Single channel image, 8 integer bits per channel.

2 - Single channel image, 16 integer bits per channel.

3 - Single channel image, 16 float bits per channel.

4 - Single channel image, 32 float bits per channel.

5 - Four channel image, 8 integer bits per channel.

6 - Four channel image, 16 integer bits per channel.

7 - Four channel image, 16 float bits per channel.

8 - Four channel image, 32 float bits per channel.

IMG_Quality

The IMG_Quality attribute is a boolean value which specifies whether the image is High Quality (true) or Interactive Quality (false). The IMG_Quality will be true during a final render, or if the HiQ button in the Time Ruler of the composition is selected. It is usually set by calling the Request:IsQuick function.

If you create a temporary image, make sure not to omit IMG_Quality It defaults to "false" which means that scaling and merging it over another image will use nearest-neighbor filtering (resulting in jagged

edges). Either set it according to what the Request object returns or set it to true to always use smooth filtering even when the comp is in low quality mode.

IMG_ProxyScale

The IMG_ProxyScale is an integer value representing the current Proxy scale of the image. For example if the current proxy is 2/1, then this should be set to 2.

IMG_MotionBlurQuality

The IMG_MotionBlurQuality attribute is a boolean value which specifies whether Motion Blur is currently enabled for this image. It is usually set by calling the Request:IsNoMotionBlur function.


Name

Description

IMG_Channel

Specify the channels which should be included in the image using the IMG_Channel table values. This is different from all the ones table values above. It should be specified as shown here.


image

local imgattrs = { IMG_Document = self.Comp,

{ IMG_Channel = "Red", },

{ IMG_Channel = "Green", },

{ IMG_Channel = "Blue", },

{ IMG_Channel = "Alpha", }, IMG_Width = 1920,

IMG_Height = 1080,

IMG_XScale = 1.0,

IMG_YScale = 1.0,

IMG_Quality = not req:IsQuick(),

IMG_MotionBlurQuality = not req:IsNoMotionBlur(),

}


Valid channel names include :

"Red", "Green", "Blue", "Alpha",

"BgRed", "BgGreen", "BgBlue", "BgAlpha"

"Z", "Coverage"

"Object", "Material"

"U", "V", "W"

"NormalX", "NormalY", "NormalZ"

"PositionX", "PositionY", "PositionZ"

"VectorX", "VectorY"

"BackVectorX", "BackVectorY"

"DisparityX", "DisparityY"

IMG_DataWindow IMG_ValidWindow

This is used to define the DoD of an image. DataWindow contains the actual size of the pixel area that may be accessed. Writing outside of its bounds may crash

ValidWindow specifies the area for which the image is valid (usually the Region of interest. If a new request that is just a subarea of the old one is performed, no re-rendering will take place.

Both attributes are read-only. To set them during image creation, use the IMG_DataWindow and IMG_ValidWindow attributes. Both expect FuRectInt objects which are basically four integer pixel values for the left, bottom, and right, top edges of a rectangle

IMG_NoData

Has to be set to true during a precalc request and will create an image object with all its attributes but without allocating memory for the pixel data. If you assign it the result of request:IsPreCalc() this will work for both precalc and process requests.