hi all!

I've just discovered Template::Plugin::ExifTool, great great great. Now, I've also discovered that most camera's keep a thumbnail in this exif information too, which is perfectly viewable with this great Template plugin.

for instance, when i call the information for an image, i saw this key and value:
ThumbnailImage => SCALAR(0x84fe774)

so my little brain saw "SCALAR" and it said to my fingers "dereference it!". so i produce something like this:

[%- USE image = ExifTool(image_file) -%] [%- thumb=image.GetValue('ThumbnailImage','Binary') ; $thumb -%]

of course, if the above worked, you wouldn't be reading this message. The error message in question is:

undef error - Template::Stash::XS: get (arg 2) must be a scalar or lis +tref at ./thumb.tmpl line 4.
(line 4 is the USE-line)

If I view the variable thumb with Dumper.dump(thumb)... than I can see the binary data. Well I see:

VAR1 = \'[binary data]';

Anybody any ideas how i should display the thumb? Thanks a lot!

to ask a question is a moment of shame
to remain ignorant is a lifelong shame


In reply to Template::Plugin::ExifTool thumbnails by insaniac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.