Eyeon:Script/Reference/Applications/Fuse/Classes/Image/Gain
From VFXPedia
< Eyeon:Script | Reference | Applications | Fuse | Classes | Image
Contents |
Summary
The Gain function multiplies every pixel in the image by the specified value. The result is applied directly to the Image object which calls the function. This function does not return a value.
Usage
Image:Gain(number r, number g, number b, number a)
- number r, g, b, a (number, required)
- The amount by which to gain the image.
Example
A very simple gain tool.
FuRegisterClass("SampleSlider", CT_Tool, { REGS_Category = "Fuses\\Samples", REGS_OpIconString = "SSl", REGS_OpDescription = "SampleSlider", }) function Create() InGain = self:AddInput("Gain", "Gain", { LINKID_DataType = "Number", INPID_InputControl = "SliderControl", INP_Default = 1.0, }) InImage = self:AddInput("Input", "Input", { LINKID_DataType = "Image", LINK_Main = 1, }) OutImage = self:AddOutput("Output", "Output", { LINKID_DataType = "Image", LINK_Main = 1, }) end function Process(req) local img = InImage:GetValue(req) local gain = InGain:GetValue(req).Value local newimg = img:Copy() newimg:Gain(gain, gain, gain, gain) OutImage:Set(req, newimg) end
Tips for Gain (edit)
EyeonTips:Script/Reference/Applications/Fuse/Classes/Image/Gain