Re: [Gexiv2] [Shotwell] [OT] How to find the EXIF thumbnail from the RAW images



Hi Kushal,

I'm cc:ing the gexiv2 mailing list, as this question pertains to both
projects.

First, a clarification.  libexif is used because of a single limitation in
Exiv2 (the library gexiv2 wraps): Exiv2 doesn't offer a way to return the
raw (i.e. actual) bytes of the EXIF segment, which we checksum to identify
matching photos on a camera (where checksumming the entire file would be
expensive).  libexif will do that, however.  Additionally, libexif can
return the EXIF block without the thumbnail, the EXIF thumbnail alone, or
both, which is useful to Shotwell as well.  If Exiv2 ever includes this
feature, Shotwell will probably jettison libexif entirely.

gexiv2 has two methods for retrieving the EXIF thumbnail.  One is to call
gexiv2_metadata_get_exif_thumbnail() (which I assume you're doing).  This
does pretty much what it sounds like it does.

However, some RAW formats don't include a thumbnail in their EXIF segment.
(Since the total size of an EXIF block can not be larger than 64K, it puts a
crimp on the size of the thumbnail.)  RAW files often include large
thumbnails (some the dimensions of the RAW image itself), and often include
more than one.  What you probably want to use is gexiv2's preview manager
functions.

gexiv2_metadata_get_preview_properties() lists all the previews found in the
file (including the EXIF thumbnail), and gexiv2_metadata_get_preview_image()
will return the thumbnail itself.  Note that the list of returned properties
is ordered from smallest to largest.

More information on the preview manager is here:
http://dev.exiv2.org/projects/exiv2/wiki/Accessing_preview_images

-- Jim

On Thu, Jul 8, 2010 at 3:17 AM, Kushal Das <kushaldas gmail com> wrote:

Hi,
This may an OT question here, but I was reading and trying to using
gexiv2. What I understood that you are using both gexiv2 and libexif
in shotwell. When I tried only gexiv2 to extract thumbnails from RAW
files (here .NEF) it failed. Do I have to use libexif as done in
shotwell ?


Kushal
--
http://fedoraproject.org
http://kushaldas.in
_______________________________________________
Shotwell mailing list
Shotwell lists yorba org
http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]