Module fipTag

Corona wrapper for fipTag.

FreeImage uses this structure to store metadata information.

Functions

fipTag:assign (tag) Copies one tag to another.
fipTag:clone (tag) Creates a new tag that is a copy of another.
fipTag:getCount () Returns the number of components in the tag (in tag type units).
fipTag:getDescription () Returns the tag description if available.
fipTag:getID () Returns the tag ID if available, returns 0 otherwise.
fipTag:getKey () Returns the tag field name (unique inside a metadata model).
fipTag:getLength () Returns the length of the tag value in bytes.
fipTag:getType () Returns the tag data type.
fipTag:getValue () Returns the tag value.
fipTag:isValid () Indicates whether the tag is valid for use.
fipTag:setCount (count) Set the number of data in the tag.
fipTag:setDescription (description) Set the (usually optional) tag description.
fipTag:setID (id) Set the (usually optional) tag ID.
fipTag:setKey (key) Set the tag field name.
fipTag:setKeyValue (name, value) Construct a FIDT_ASCII tag (ASCII string).
fipTag:setLength (length) Set the length of the tag value, in bytes.
fipTag:setType (type) Set the tag data type.
fipTag:setValue (value) Set the tag value.
fipTag:toString (model) Converts a FreeImage tag structure to a string that represents the interpreted tag value.


Functions

fipTag:assign (tag)
Copies one tag to another.

Parameters:

  • tag fipTag Tag to assign.
fipTag:clone (tag)
Creates a new tag that is a copy of another.

Parameters:

  • tag fipTag Tag to clone.

Returns:

    fipTag Clone.
fipTag:getCount ()
Returns the number of components in the tag (in tag type units).

Returns:

    uint Count.
fipTag:getDescription ()
Returns the tag description if available.

Returns:

    string or nil Description.
fipTag:getID ()
Returns the tag ID if available, returns 0 otherwise.

Returns:

    uint ID.
fipTag:getKey ()
Returns the tag field name (unique inside a metadata model).

Returns:

    string Key.
fipTag:getLength ()
Returns the length of the tag value in bytes.

Returns:

    uint Length.
fipTag:getType ()
Returns the tag data type.

Returns:

    string Type, cf. enums.FREE_IMAGE_MDTYPE.
fipTag:getValue ()
Returns the tag value.

Returns:

    userdata Value. (TODO!!!!! something more robust for Lua)
fipTag:isValid ()
Indicates whether the tag is valid for use.

Returns:

    boolean Tag is allocated?
fipTag:setCount (count)
Set the number of data in the tag.

Parameters:

  • count uint Count to assign.

Returns:

    boolean Assignment succeeded?
fipTag:setDescription (description)
Set the (usually optional) tag description.

Parameters:

  • description string Description to assign.

Returns:

    boolean Assignment succeeded?
fipTag:setID (id)
Set the (usually optional) tag ID.

Parameters:

  • id uint ID to assign.

Returns:

    boolean Assignment succeeded?
fipTag:setKey (key)
Set the tag field name.

Parameters:

Returns:

    boolean Assignment succeeded?
fipTag:setKeyValue (name, value)
Construct a FIDT_ASCII tag (ASCII string).

This method is useful to store comments or IPTC tags.

Parameters:

Returns:

    boolean Assignment succeeded?
fipTag:setLength (length)
Set the length of the tag value, in bytes.

Parameters:

  • length uint Length to assign.

Returns:

    boolean Assignment succeeded?
fipTag:setType (type)
Set the tag data type.

Parameters:

Returns:

    boolean Assignment succeeded?
fipTag:setValue (value)
Set the tag value.

Parameters:

  • value Value to assign. (TODO: something more robust for Lua!!!!)

Returns:

    boolean Assignment succeeded?
fipTag:toString (model)
Converts a FreeImage tag structure to a string that represents the interpreted tag value. (NYI: oversight?)

Parameters:

Returns:

    string Representative string.
generated by LDoc 1.4.0