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

From VFXPedia

< Eyeon:Script | Reference | Applications | Fuse | Classes | Image
Revision as of 00:37, 23 February 2008 by Izyk (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Summary

The Saturate function adjusts the saturation of the image. The result is applied directly to the Image object which calls the function. This function does not return a value.


Usage

Image:Saturate(number r, number g, number b)

number r, g, b (number, required)
The amount by which to adjust the saturation. A value of 1.0 means no change.


Example

A very simple saturate tool.

FuRegisterClass("SimpleSaturate", CT_Tool, {
	REGS_Category = "Fuses\\eyeon\\Color",
	REGS_OpIconString = "SSt",
	REGS_OpDescription = "SimpleSaturate",
	})
	
function Create()
	InSat = self:AddInput("Saturation", "Saturation", {
		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 sat     = InSat:GetValue(req).Value
	
	local newimg  = img:Copy()
 
	newimg:Saturate(sat, sat, sat)
	
	OutImage:Set(req, newimg)
end


Tips for Saturate (edit)

This function only works since Fusion 6.1.4 Build 760!