Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

GTK2 Exif Thumbnail Reader

by renegadex (Beadle)
on Aug 31, 2009 at 12:51 UTC ( #792359=snippet: print w/ replies, xml ) Need Help??

Description: This snippet shows how to get the thumbnail from exif metadata. This is very usefull for generating very fast thumbnails!! I hope many would benefit from this.
use Image::ExifTool qw(ImageInfo);
my $exifTool = new Image::ExifTool;
$exifTool->Options(Binary => 1);
my $info = $exifTool->ImageInfo('image_file.jpg', 'thumbnailimage');
my $data = ${$$info{ThumbnailImage}};
my $loader = Gtk2::Gdk::PixbufLoader->new();
$loader->write($data);
$loader->close();
$pixbuf = $loader->get_pixbuf();
since you are able to make the thumbnail into a pixbuf then you may now use your favourite widget to preview the thumbnail.

the $exifTool is an Image::ExifTool, so you need this module to make it work. you can yum it using... yum install perl-Image-ExifTool.

*some of the codes i got from other monks*
Comment on GTK2 Exif Thumbnail Reader
Download Code
Re: GTK2 Exif Thumbnail Reader
by Anonymous Monk on Sep 02, 2009 at 05:14 UTC
    wow nice code!
Re: GTK2 Exif Thumbnail Reader
by CircusGimp (Novice) on Apr 01, 2014 at 09:41 UTC
    Thanks for sharing

Back to Snippets Section

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://792359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-07-26 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (176 votes), past polls