Re: pictures stored in PostgreSQL DB
| From: | Martin Marques | Date: | Sat, 03 Mar 2007 13:40:35 +0000 |
| Subject: | Re: pictures stored in PostgreSQL DB | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249770@lists.php.net to get a copy of this message | ||
Robert Cummings escribió:
On Sat, 2007-03-03 at 11:02 +0100, Alain Roger wrote:Robert! You're spoiling him! :-D He has to know how to read the messages and interpret them correctly (and get the code done well). -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; --------------------------------------------------------- Martín Marqués | Programador, DBA Centro de Telemática | Administrador Universidad Nacional del Litoral ---------------------------------------------------------I know how to do that for 1 picture. But i want to display the pictures as thumbnail... so several pictures on the same PHP pages, with some texts. therefore, your solution does not correspond to what i need.You need two scripts. One script that contains the <img> tags to your thumbnails, and another script that creates the thumbnails (possiblies caches them), sets the appropriate header (Content-Type: image/xxx -- where xx is png or jpeg or gif or ...) and then flushes the image binary content to the browser. You will also need to make use of the image functions in PHP to create your thumbnail. Here are some links:http://ca.php.net/manual/en/function.header.php http://ca.php.net/manual/en/function.imagecreatefromstring.php http://ca.php.net/manual/en/function.imagecopyresampled.phpLet say you create two scripts... gallery.php and showImage.php. Then gallery.php will output content something like: