[gstreamer-bugs] [Bug 486659] New: metadata parser for image files

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Oct 14 12:24:52 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=486659

  GStreamer | gst-plugins-bad | Ver: HEAD CVS
           Summary: metadata parser for image files
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: edgard.lima at indt.org.br
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Some info fisrt

- - - info related to Exif - - -

Can embedded EXIF into JPEG or TIFF 6.0 images

JPEG starts with 0xFFD8 (SOI - Start Of Image)

TIFF starts with 0x49492A00 or 0x4D4D002A it dependes on byte order

JPEG imagens could be found in JFIF file format or EXIF file format

JFIF starts with 0xFFD8 (jpeg SOI) 0xFFE0 (app mark 0) 0xxxxx (size) 0x4A464946
('JFIF')

EXIF starts with 0xFFD8 (jpeg SOI) 0xFFE1 (app mark 1) 0xxxxx (size) 0x45786966
('EXIF')

...so JFIF and EXIF are not compatible

JPEG files are divided in segments and sometimes we can find EXIF segment
(which is app mark 1 + size + 'EXIF') somewhere after JFIF segment. It means
that it is a JFIF file, but some EXIF libs search for such segments anyway. In
our implementation we could decide to not get metadata of those files if we
don't want to.

jpegdec can render both EXIF and JPEG

Once we find the EXIF inside the TIFF or JPEG file, we can extract the info in
the same way

- - - info related to IPTC - - -

IPTC metadata can be embedded in JFIF (photoshop segment oxFFED (APP MARK 14)),
EXIF (exif segment) and TIFF files

* it is alredy possible to have EXIF and IPTC on PSD files

- - - XMP - - -

can be inside PDF, JPEG, JPEG 2000, GIF, PNG, HTML, TIFF, Adobe Illustrator,
PSD, SVG/XML, DNG, PostScript and Encapsulated PostScript

In PDF documents, XMP can not only be used to describe the document as a whole,
but can also be attached to parts of the document, such as pages, included
images, and tags defining structural divisions of the document

in case of JPEG it is inside a APP1 Marker (so it is compatible with a JFIF or
also EXIF if it on a second APP1 marker)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

So it seems to be too much generic...

my idea is to have the following design

we should create on -base, helper functions to generate a tag list

GstTagList *gst_tag_list_from_metadata_chunk(const GstBuffer * buffer);

each image demuxer/decoder has to find out the metadata chunk and then call
this method.

on the other side, muxer/encoder should call

GstBuffer *gst_exif_chunk_from_tag_list(GstTagList *);
GstBuffer *gst_iptc_chunk_from_tag_list(GstTagList *);
GstBuffer *gst_xmp_chunk_from_tag_list(GstTagList *);

and then, the muxer/encoder has to where to write this chunk in the file

....so, it would be need modifications to each decoder/demuxer/encoder/muxer
that wants to extract/inject metadata info

ps: we could implement it step-by-strep, starting for example with jpegdec and
exif

BR,
Edgard


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=486659.




More information about the Gstreamer-bugs mailing list