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

From VFXPedia

< Eyeon:Script | Reference | Applications | Fuse | Classes | Image
Revision as of 03:48, 15 September 2009 by Daniel (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Summary

The GetCanvasColor function is used to retrieve the canvas color values of an Image.

The canvas color is the "default" pixel color, and is used for any part of the image which is not explicitly defined by pixels. This is usually black/transparent, but can be different after certain operations, such as inverting the image.


Usage

GetCanvasColor(object pixel)

pixel
The Pixel object that will receive the color values of the image's canvas.


Example

local p = Pixel()
 
img:GetCanvasColor(p)
 
if p.R == 0 and p.G == 0 and p.B == 0 and p.A == 0 then
    print("Image canvas is black/transparent")
else
    print("Image canvas is non-black.")
end


Tips for GetCanvasColor (edit)

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