Module: Gegl::Metadata

Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#get_resolution(unit, x, y) ⇒ Boolean

Retrieve resolution from the application image metadata. Intended for use by the image file writer. If resolution is not supported by the application or if the operation fails false is returned and the resolution values are not updated.

Parameters:

  • unit (Gegl::ResolutionUnit)

    Gegl::ResolutionUnit return location

  • x (Gegl::gfloat)

    X resolution return location

  • y (Gegl::gfloat)

    Y resolution return location

Returns:

  • (Boolean)

    true if successful.

#iter_get_value(iter, value) ⇒ Boolean

Retrieve image file metadata from the application. Intended for use by the image file writer. If the operation fails it returns false and value is not updated.

Parameters:

  • iter (Gegl::MetadataIter)

    Gegl::MetadataIter referencing the value to get

  • value (GObject::Value)

    Value to set in the interface

Returns:

  • (Boolean)

    true if successful.

#iter_init(iter) ⇒ nil

Initialise an iterator to find all supported metadata keys.

Parameters:

  • iter (Gegl::MetadataIter)

    Gegl::MetadataIter to be initialised

Returns:

  • (nil)

#iter_lookup(iter, key) ⇒ Boolean

Look up the specified key and initialise an iterator to reference the associated metadata. The iterator is used in conjunction with gegl_metadata_set_value() and gegl_metadata_get_value(). Note that this iterator is not valid for gegl_metadata_iter_next().

Parameters:

  • iter (Gegl::MetadataIter)

    Gegl::MetadataIter to be initialised

  • key (String)

    Name of the value look up

Returns:

  • (Boolean)

    true if key is found.

#iter_next(iter) ⇒ String

Move the iterator to the next metadata item

Parameters:

  • iter (Gegl::MetadataIter)

    Gegl::MetadataIter to be updated

Returns:

  • (String)

    key name if found, else nil

#iter_set_value(iter, value) ⇒ Boolean

Set application data retrieved from image file's metadata. Intended for use by the image file reader. If the operation fails it returns false and value is ignored.

Parameters:

  • iter (Gegl::MetadataIter)

    Gegl::MetadataIter referencing the value to set

  • value (GObject::Value)

    Value to set in the interface

Returns:

  • (Boolean)

    true if successful.

#register_map(file_module, flags, map, n_map) ⇒ nil

Set the name of the file module and pass an array of mappings from file-format specific metadata names to those used by Gegl. A GValue transformation function may be supplied, e.g. to parse or format timestamps.

Parameters:

  • file_module (String)

    String identifying the file module, e.g, "gegl:png-save"

  • flags (Integer)

    Flags specifying capabilities of underlying file format

  • map (Array<Gegl::MetadataMap>)

    Array of mappings from file module metadata names to Gegl well-known names.

  • n_map (Integer)

    Number of entries in map

Returns:

  • (nil)

#set_resolution(unit, x, y) ⇒ Boolean

Set resolution retrieved from image file's metadata. Intended for use by the image file reader. If resolution is not supported by the application or if the operation fails false is returned and the values are ignored.

Parameters:

  • unit (Gegl::ResolutionUnit)

    Specify Gegl::ResolutionUnit

  • x (Gegl::gfloat)

    X resolution

  • y (Gegl::gfloat)

    Y resolution

Returns:

  • (Boolean)

    true if successful.

#unregister_mapnil

Unregister the file module mappings and any further mappings added or modified by the application. This should be called after the file module completes operations.

Returns:

  • (nil)