Posted by Default User on 09/21/05 23:34
Steve wrote:
>
> > echo pg_unescape_bytea($imgdata); //PostgreSQL database
>
> > However, in this instance I need to be able to resize it to a
> > thumbnail image prior to outputting. How would I do this?
>
>
> First
> <http://www.php.net/manual/en/function.imagecreatefromstring.php>
> then <http://www.php.net/manual/en/function.imagecopyresized.php> or
> <http://www.php.net/manual/en/function.imagecopyresampled.php>, then
> <http://www.php.net/manual/en/function.imagejpeg.php>, and finally
> <http://www.php.net/manual/en/function.imagedestroy.php>.
Some implementations won't have the JPEG support compiled in. There's
sometimes a program on UNIX systems called convert that can do what's
needed.
http://www.die.net/doc/linux/man/man1/convert.1.html
Brian
[Back to original message]
|