Module fipMetadataFind
Corona wrapper for fipMetadataFind, a metadata iterator.
Usage :
local freeimage = require("plugin.freeimage")
local image
-- ...
local finder = freeimage.NewMetadataFind()
local ok, tag = finder:findFirstMetadata("EXIF_MAIN", image)
if ok then
repeat
-- process the tag
print(tag:getKey())
ok, tag = finder:findNextMetadata()
until not ok
end
-- the class can be called again with another metadata model
ok, tag = finder:findFirstMetadata("EXIF_EXIF", image)
if ok then
repeat
-- process the tag
print(tag:getKey())
ok, tag = finder:findNextMetadata()
until not ok
end
Functions
fipMetadataFind:findFirstMetadata (model, image) | Provides information about the first instance of a tag that matches the metadata model specified in the model argument. |
fipMetadataFind:findNextMetadata () | Find the next tag, if any, that matches the metadata model argument in a previous call to fipMetadataFind:findFirstMetadata. |
fipMetadataFind:isValid () | Indicates whether the iterator is valid for use. |
Functions
- fipMetadataFind:findFirstMetadata (model, image)
-
Provides information about the first instance of a tag that matches the metadata model specified in the model argument.
Parameters:
- model string Metadata model, cf. enums.FREE_IMAGE_MDMODEL.
- image fipImage Input image.
Returns:
- boolean Find succeeded?
- fipTag On success, the first tag.
- fipMetadataFind:findNextMetadata ()
-
Find the next tag, if any, that matches the metadata model argument in a previous call to fipMetadataFind:findFirstMetadata.
Returns:
- boolean Find succeeded?
- fipTag On success, the next tag.
- fipMetadataFind:isValid ()
-
Indicates whether the iterator is valid for use.
Returns:
-
boolean
Search handle is allocated?