Subject Re: Converting a JPEG to a blob...
Author Adam
--- In, "killerion" <killerion@...>
> > Firebird only supports direct blob inserts into text blobs, not
> binary data.
> so no even manipulating the image as a giant string would work? and
> possibly as a varchar?

What Martijn means is that there if you try to use an insert or an
update statement with a BLOB field, Firebird will assume it to be
text. There is a limit of 32KB though for this automatic conversion.

When you ask about manipulating it as a string, well of course if you
were to encode it with base64 or something you could store that as a
long piece of text, but my guess is that your JPEGs will be larger
than this.

Most if not all languages have a way of inserting and retrieving BLOB
data regardless of size or type, but as you have not said which
language and connection components you are using, no specific advise
could be given.

If you are not using a particular language, and just wanted a tool to
do the conversion and inserting for you, you could use FSQL.

Note that BLOBs are stored AS IS with no compression. For JPEGs that
probably is not an issue, but other file types could benefit from
client side compression before storage and decompression post storage.