< Previous | Contents | Next >

Metadata Functions


The metadata is stored in a member variable for every Image called .Metadata (it’s nil if no metadata is available) that can both be read and written. Using the functions eyeon.writestring() and eyeon.

readstring() and the string functions of lua known and custom metadata can be processed with a fuse.


--[[--

This tool reads an image’s metadata and prints to the console

--]]--


FuRegisterClass("ReadMetaData", CT_Tool, { REGS_Name = "Read Metadata", REGS_Category = "Fuses\\Examples", REGS_OpIconString = "RMeta",

REGS_OpDescription = "Reads Metadata and prints to console", REG_NoMotionBlurCtrls = true,

REG_NoBlendCtrls = true, REG_OpNoMask = true, REG_NoPreCalcProcess = true, REG_SupportsDoD = true, REG_Fuse_NoJIT = true,

})


function Create()

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 result =img

local meta


for name, val in pairs(result.Metadata) do meta = result.Metadata[name] print(name, meta)

end

OutImage:Set(req, result)

end

 

ReadstringSummaryUsageExampleWritestringSummaryUsage