< Previous | Contents | Next >

Metadata and Fuses

This section describes what you need to know about metadata when writing Fuses.

The metadata is stored in a member variable of every Image object called .Metadata (it’s nil if no metadata is available) that can both be read and written. Using the LUA functions eyeon.writestring() and eyeon.readstring(), you can place almost anything into the metadata that gets passed around.

To copy the metadata of your input image, it is recommended to use the IMG_Like attribute when creating your output image, even if you then define a different size or channel configuration. This will make sure the metadata of the input image is preserved.

All the metadata tools described above are Fuses so you can easily learn from their source code and adapt them for your own use cases. The SparseColor Fuse is another example of how to read and write metadata.