Reputation: 398
Photos from cameras contain a thumbnail and the photo itself. The thumbnail is created and used by the cameras to browse quickly without loading the full image.
I would like to mimic such behavior with C and Gtk+ 2.
Tools such as exiftool
or dcraw
can extract the thumbnail into a new file. However, I would like to load the thumbnail directly into a GdkPixbuf
instead.
If there any function to extract the thumbnail already existing in photo and load it into GdkPixbuf
?
Upvotes: 0
Views: 427
Reputation: 21
No
The loading of images is via pixbuf loaders so if you have a nef or cr2, you have to provide a loader to handle these types of files
The way I have implemented this is to build my own pixbuf loader and use exiv2 to obtain the embedded preview image (a tif or jpg) and then let the standard pixbuf loaders load that
Upvotes: 1
Reputation: 7434
There are many ways but not an official™ one.
If you do not want to lose yourself in the EXIF details you can leverage eog (Eye of GNOME): under the wood it is mainly a C library.
Link your app to that library and call eog_thumbnail_load on your EogImage object.
Upvotes: 1