Unfortunately, Image::Epeg-new(\$jpg_data); isn’t working.
What makes you write that? I'm too lazy to whip up a database, but the following code pulls a JPEG image into a scalar and thumbnails it successfully.
use 5.020; use warnings; use Image::Epeg qw(:constants); use LWP::Simple; # Copyright notice for the image: # By Randal Schwartz from Portland, OR, USA - Flickr, CC BY-SA 2.0, # https://commons.wikimedia.org/w/index.php?curid=2938351 my $image = get("https://upload.wikimedia.org/wikipedia/commons/b/b3/L +arry_Wall_YAPC_2007.jpg"); die "Failed to load the image" unless defined $image; my $epeg = Image::Epeg->new(\$image); $epeg->resize(150,150,MAINTAIN_ASPECT_RATIO); $epeg->write_file("thumbnail.jpg");
Side note: You need to have LWP::Protocol::https installed for this code.

In reply to Re: Extracting a blob from DBI to a buffer by haj
in thread Extracting a blob from DBI to a buffer by Serene Hacker

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.