< Previous | Contents | Next >

Example

A simple Fuse to convert an Image from RGB to HLS and back again.


function Process(req)

local op = InOperation:GetValue(req).Value local img = InImage:GetValue(req)


local newimg = img:Copy()


if op == 0 then

newimg:CSConvert("RGB", "HLS")

else

newimg:CSConvert("HLS", "RGB")

end


OutImage:Set(req, newimg)

end