EyeonTips:Script/Reference/Applications/Fuse/Classes/Image/Constructor

From VFXPedia

Jump to: navigation, search
  • An image created by using {IMG_Like = ...} is not cleared. Its pixels may contain old data from the image cache. If you don't use the image as a target for methods that overwrite the pixels with valid ones you have to clear it yourself using the Fill method.
  • If you want to work on a 32bit floating point version of the input image internally to prevent quality loss when chaining multiple color corrections, use the Crop method to copy the original image to a temporary one:
 local orig = InImage:GetValue(req)
 -- copy to a float32 image
 local temp32 = Image({IMG_Like = orig, IMG_Depth = 8})
 orig:Crop(temp32, {CROP_XOffset = 0, CROP_YOffset = 0})
 
 --- do processing ---
 
 -- copy to an image of the original bit depth
 out = Image({IMG_Like = orig})
 temp32:Crop(out, {CROP_XOffset = 0, CROP_YOffset = 0})
 OutImage:Set(req, out)
  • Single-channel images (IMG_Depth < 5, see Attributes) have an alpha channel only. Methods like Gain() still need to be called with four parameters, the first three will be ignored.