Eyeon:Script/Reference/Applications/Fuse/Classes/Image

From VFXPedia

< Eyeon:Script | Reference | Applications | Fuse | Classes
Revision as of 00:50, 16 September 2014 by Stuart (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Parent Class: Parameter

Image.

Contents

Methods:

ApplyMatrixDestructively applies a matrix of color operations
ApplyMatrixOfApplies a matrix of color operations to a new image
BlendOfFades and dissolves between images
BlurSoftens an image
ChannelOpOfApplies various math and boolean operations
CopyOfCreate a copy of the image
CropCrops or offset an image
CSConvertConverts between RGB,HLS,YUV and others
ErodeDilateA min/max operation used to contract or expand the contents of an image [Fusion 7]
FillSets all pixels to a single colour
GammaApplies a power operation to all pixels
GainMultiplies all pixels by a given value
GetCanvasColorReads the color of the image's canvas area
GetPixelReads the value of a single pixel
ImageConstruct a new Image object
MergeOverlays a foreground on the background image
MergeOfOverlays a foreground and background to a new image
MultiProcessPixelsApplies a function to each pixel using multiple threads
OMergeSimple destructive additive merge
OXMergeSimple destructive subtractive merge
ProcessPixelsApplies a function to each pixel
ResizeChange the resolution of an image
RecycleReleases refcount, used to delete an image
RecycleSATReleases refcount, used to delete an image's summed-area table
SamplePixelBFetch pixel with bilinear filtering, returns black edges
SamplePixelDFetch pixel with bilinear filtering, returns duplicate edges
SamplePixelWFetch pixel with bilinear filtering, returns wrapped edges
SampleAreaBCalculates normalised sum of a rectangular area, black edges
SampleAreaDCalculates normalised sum of a rectangular area, duplicate edges
SampleAreaWCalculates normalised sum of a rectangular area, wrapped edges
SaturateIncreases or decreases color saturation
SetCanvasColorChanges the color of the image's canvas area
SetPixelChange the value of a single pixel
TransformTranslate, Rotate, Scale and Flip an image
UseAdd a refcount to the image
UseSATAdd a refcount to the summed-area table

Members:

DepthInteger. The color depth of the image. The return value is an index from the IMG_Depth attribute in Attributes.
Width / HeightInteger. The current width and height of the image in pixels. If the image is in Proxy, this is the actual width and height
OriginalWidth / OriginalHeightInteger. The width and height of the image in pixels. This is always the original width and height, regardless of the current proxy settings.
XScale / YScaleNumber. The current X and Y pixel aspect of the image.
OriginalXScale / OriginalYScaleNumber. The original X and Y pixel aspect of the image, regardless of current proxy settings.
XOffset / YOffsetNumber.
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.