Serene Hacker has asked for the wisdom of the Perl Monks concerning the following question:
I’ve been away from perl (and programming in general) for a looong time — so I’m a bit rusty :-(
I have an SQLite database containing jpg blobs.
I’d like to extract them and then pass each jpg data blob (one at a time) into Image::Epeg to create thumbnails.
Unfortunately, Image::Epeg-new(\$jpg_data); isn’t working. (It works ok when reading from a file, but not from a “data ref”).
What I’d like to avoid is extracting the blob to a scalar, writing that to disk and then opening the file from Epeg. Is it possible to extract into a memory-mapped file (one created in a virtual file system) directly? Or something like that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting a blob from DBI to a buffer
by choroba (Cardinal) on Oct 30, 2019 at 18:12 UTC | |
|
Re: Extracting a blob from DBI to a buffer
by haj (Vicar) on Oct 30, 2019 at 19:30 UTC | |
by Serene Hacker (Initiate) on Oct 31, 2019 at 19:26 UTC | |
|
Re: Extracting a blob from DBI to a buffer
by jcb (Parson) on Oct 31, 2019 at 01:52 UTC | |
|
Re: Extracting a blob from DBI to a buffer
by GrandFather (Saint) on Oct 30, 2019 at 20:03 UTC |