Not a lot of feedback to my original enquiry, but nevertheless I found the
answer, which I shall pass on in case it is of use to others.

The essential function is imagecreatefromstring()  Using this in conjunction
with other functions allows an image string that has been stored in a
database to be converted into a format that can be exported as a file,
manipulated and returned to the database, or whatever.

All very obvious when you know how, but it takes some finding if you don't
know what you are looking for!

Alan Bannister

-----Original Message-----
From: Alan Bannister [mailto:[EMAIL PROTECTED] 
Sent: 08 January 2008 23:03
Subject: [PHP-DB] Manipulating Blob Fields

Hi, this is my first posting to this group, so I hope it gets to the right

I have been experimenting with uploading image files and storing them in a
mySQL database table.

So far I have been able to upload and extract data from an image file, add
it to the database and subsequently display it.  I can also resize, etc. so
long as I have the original file to process.

What I cannot fathom is how to do this by reading image data stored in a
blob field in the table rather than a file.  Most of the image functions
seem to need a file as the source.

Anyone help a newbie?


Alan Bannister

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to