Resizing a jpeg stored in a database
| From: | Donald Tyler | Date: | Thu, 18 Sep 2003 20:51:50 +0000 |
| Subject: | Resizing a jpeg stored in a database | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-163055@lists.php.net to get a copy of this message | ||
Hi,
I have a question that I hope you can answer. So far I have accomplished
the following:
Storing a jpeg in a MySQL database
Retrieving the jpeg from the database
Sending the jpeg to a browser and displaying it correctly
Creating dynamic PNG images in PHP
Resizing the dynamic PNG image in PHP
Now I need to combine the two processes. I am storing jpegs in a
database, and I want to write a script that can serve the image as
either a thumbnail view or a full view. How exactly would I go about
this? I was hoping I could just load the image from the database and
then insert it into an object I created with "imagecreate()". However I
don't seem to be able to find any functions that will allow me to do
that.
I noticed there were functions to import images from files or URL's.
Does this mean that I will first have to save the image as a file on the
hard drive and THEN import it into the image object?
Thanks in advance for your help.
Donald Tyler