[Zope] blob image from MySql

Andy Dustman farcepest at gmail.com
Tue Mar 1 16:14:03 EST 2005


On Tue, 1 Mar 2005 21:40:28 +0100, Adriano <adriano at euma.com> wrote:
> Well, there's no longer the "array(c,...)
> starting; But it still doesn't work correctly
> 
> To be more specific, the downloaded file now starts like:

(Your original start looks like this in quoted-printable encoding:

?=9D??=00=10JFIF=00=01=01=01=00H=00H=00=00??=00C=00=06=04=04=04=05=04=06=05=
=05=06

Note the JFIF, which is a tagging standard for JPEG).

Are you quite sure the data in the database isn't corrupted to start
with? It's not entirely clear to me (after reviewing this thread) how
you got it in there in the first place. After looking at some JPEGs
with hexdump, it appears that most of them (those using the JFIF
standard) start with the hexadecimal sequence d8ff e0ff. I have some
which use the EXIF standard instead and these start d8ff e1ff. In any
event, they should all start with 0xd8ff; that seems to be the magic
number.

For example, one of them starts like this:

ff d8 ff e0 00 10 4a 46  49 46 00 01 02 01 01 2c  |......JFIF.....,|

It looks like you might be missing 4 bytes of data at the beginning,
or else your pasted stuff got mangled.
-- 
Computer interfaces should never be made of meat.

Using GMail? Setting Reply-to address to <> disables this annoying feature.

You are in a maze of twisty little passages all alike.
To go north, press 2. To go west, press 4.
To go east, press 6. To go south, press 8. 
If you need assistance, press 0 and a little dwarf
will assist you.


More information about the Zope mailing list