<?xml version="1.0" encoding="windows-1252"?>
<node id="792359" title="GTK2 Exif Thumbnail Reader" created="2009-08-31 08:51:19" updated="2009-08-31 08:51:19">
<type id="1980">
snippet</type>
<author id="697164">
renegadex</author>
<data>
<field name="doctext">
</field>
<field name="snippetdesc">
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.</field>
<field name="snippetcode">
&lt;CODE&gt;
use Image::ExifTool qw(ImageInfo);
my $exifTool = new Image::ExifTool;
$exifTool-&gt;Options(Binary =&gt; 1);
my $info = $exifTool-&gt;ImageInfo('image_file.jpg', 'thumbnailimage');
my $data = ${$$info{ThumbnailImage}};
my $loader = Gtk2::Gdk::PixbufLoader-&gt;new();
$loader-&gt;write($data);
$loader-&gt;close();
$pixbuf = $loader-&gt;get_pixbuf();
&lt;/CODE&gt;
since you are able to make the thumbnail into a pixbuf then you may now use your favourite widget to preview the thumbnail.
&lt;br&gt;&lt;br&gt;
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. 
&lt;br&gt;&lt;br&gt;
*some of the codes i got from other monks*
</field>
</data>
</node>
