Raphaƫl Quinet wrote:
/* decode the given XMP packet (read from a file) and merge it into the 
metadata parasite. */
gimp_metadata_decode_xmp  (gint32        image_ID,
                           const gchar  *xmp_packet);

/* generate an XMP packet from the metadata parasite */
const gchar *
gimp_metadata_encode_xmp  (gint32        image_ID);

/* decode the given EXIF block (read from a file) and merge it into the 
metadata parasite. */
gimp_metadata_decode_exif (gint32        image_ID,
                           guint         exif_size,
                           const gchar  *exif_block);

/* generate an EXIF block from the EXIF-compatible parts of the metadata 
parasite */
gimp_metadata_encode_exif (gint32        image_ID,
                           guint        *exif_size,
                           const gchar **exif_block);

The prototype for gimp_metadata_encode_xmp() seems inconsistent to the pattern
of the other functions you listed. I would have expected it to be:

gimp_metadata_encode_xmp (gint32        image_ID,
                          guint        *xmp_size,
                          const gchar **xmp_block);

Example of use:
- An image containing both XMP and EXIF information is loaded
- Call gimp_metadata_encode_exif (image, exif_size, exif_block) to
  load the EXIF block into the gimp metadata parasite.
- Call gimp_metadata_encode_xmp (image, xmp_packet) to merge the XMP
  information into the gimp metadata parasite.  If some properties are
  present in both XMP and EXIF (this is very likely), the old EXIF
  information is overwritten: XMP always takes precedence.

Are you proposing in step 2 of your "Example of use" above that it be done automatically in the file load plug-ins? I think that would make sense. Any XMP/EXIF data for an image should be converted to parasites on file load and coverted back to XMP/EXIF data on file save.



http://www.interlog.com/~kcozens/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172        |"Same thing we always do, Pinkutus:
                                  |  Try to assimilate the world!"
#include <disclaimer/favourite>   |              -Pinkutus & the Borg

Gimp-developer mailing list

Reply via email to