Eyeon:Script/Reference/Applications/Fuse/Classes/Image
From VFXPedia
< Eyeon:Script | Reference | Applications | Fuse | Classes
Parent Class: Parameter
Image.
Contents |
Methods:
ApplyMatrix | Destructively applies a matrix of color operations |
ApplyMatrixOf | Applies a matrix of color operations to a new image |
BlendOf | Fades and dissolves between images |
Blur | Softens an image |
ChannelOpOf | Applies various math and boolean operations |
CopyOf | Create a copy of the image |
Crop | Crops or offset an image |
CSConvert | Converts between RGB,HLS,YUV and others |
ErodeDilate | A min/max operation used to contract or expand the contents of an image [Fusion 7] |
Fill | Sets all pixels to a single colour |
Gamma | Applies a power operation to all pixels |
Gain | Multiplies all pixels by a given value |
GetCanvasColor | Reads the color of the image's canvas area |
GetPixel | Reads the value of a single pixel |
Image | Construct a new Image object |
Merge | Overlays a foreground on the background image |
MergeOf | Overlays a foreground and background to a new image |
MultiProcessPixels | Applies a function to each pixel using multiple threads |
OMerge | Simple destructive additive merge |
OXMerge | Simple destructive subtractive merge |
ProcessPixels | Applies a function to each pixel |
Resize | Change the resolution of an image |
Recycle | Releases refcount, used to delete an image |
RecycleSAT | Releases refcount, used to delete an image's summed-area table |
SamplePixelB | Fetch pixel with bilinear filtering, returns black edges |
SamplePixelD | Fetch pixel with bilinear filtering, returns duplicate edges |
SamplePixelW | Fetch pixel with bilinear filtering, returns wrapped edges |
SampleAreaB | Calculates normalised sum of a rectangular area, black edges |
SampleAreaD | Calculates normalised sum of a rectangular area, duplicate edges |
SampleAreaW | Calculates normalised sum of a rectangular area, wrapped edges |
Saturate | Increases or decreases color saturation |
SetCanvasColor | Changes the color of the image's canvas area |
SetPixel | Change the value of a single pixel |
Transform | Translate, Rotate, Scale and Flip an image |
Use | Add a refcount to the image |
UseSAT | Add a refcount to the summed-area table |
Members:
Depth | Integer. The color depth of the image. The return value is an index from the IMG_Depth attribute in Attributes. |
Width / Height | Integer. The current width and height of the image in pixels. If the image is in Proxy, this is the actual width and height |
OriginalWidth / OriginalHeight | Integer. The width and height of the image in pixels. This is always the original width and height, regardless of the current proxy settings. |
XScale / YScale | Number. The current X and Y pixel aspect of the image. |
OriginalXScale / OriginalYScale | Number. The original X and Y pixel aspect of the image, regardless of current proxy settings. |
XOffset / YOffset | Number. |
Field | Number. |
ProxyScale | Number. The current proxy scaling of the image. |
Other:
Attributes |
Tips for Image (edit)
Further Methods and Members
- Clear() has been added in Fusion 6.1.4 Build 760 and will fill all channels with zeros.
- GetChanSize(<channel>), introduced in 6.31, returns the number of bytes or 0 if the channel is not present.
- .Metadata contains a table of image metadata (or nil if no metadata is available) that can both be read and written. Refer to the metadata example fuses on how to leverage custom metadata in your fuses. Using the LUA functions eyeon.writestring() and eyeon.readstring(), you can place almost anything into the metadata that gets passed around.
Domain of Definition
Since Fusion 6.2 (build 897) there are two more members that are important for DoD:
- .DataWindow contains the actual size of the pixel area that may be accessed. Writing outside of its bounds may crash Fusion.
- .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. You can test this in the viewport yourself).
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, right and top edges of a rectangle.
All of this is demonstrated in the clBC and clMerge example Fuses that ship with current versions of Fusion and explained in the ROIDS tutorial.