Thanks everyone!

OK, Image::Epeg-new(\$jpg_data); does work. The $epg->resize function fails occasionally -- even though they're valid jpegs and larger than the crop size. (And the call is more likely to fail, the larger the crop size). And $epg->get_data occasionally fails (sticking exactly 64k zeroes at the beginning of the data, and then ever larger amounts of junk (?) on the end) -- even though resize returned 1.

There's not much point in posting code yet. I'm still trying to figure out if there's anything wrong with the input files. Or whether there's something wrong with my installation -- or even the hardware! Anyway -- whatever's going on, it has nothing to do with extracting a blob from DBI. :-)

I'm running perl 5.28.2 on Mac OS X 10.14.6 with MacPorts. I recently re-installed Xcode (and the command line tools, and MacPorts and Perl etc.) -- a software update to Xcode had changed some directories to from 10.14 to 10.15 (!) Some builds still fail (arm-none-eabi-gdb in MacPorts, and Image::Magick in CPAN) soooo, not sure what (if anything) is wrong...If I manage to narrow things down to a nice test I'll start a different thread.


In reply to Re^2: Extracting a blob from DBI to a buffer by Serene Hacker
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.