[Gllug] thumbnail creation

gllug at uncertainty.org.uk gllug at uncertainty.org.uk
Wed Dec 26 13:09:20 UTC 2001


On Wed, Dec 26, 2001 at 11:30:33AM -0000, Allen Wayne wrote:
> Hi All,
> 
> having discovered the pleasures of php and mysql, I am in the process of
> writing a database for storing image details. I am not storing the images
> directly in the database, but the preview images at the moment at just the
> image width-ed to a small value. I am looking for a way to generate a
> thumbnail from an image on the fly, from php. anyone with any ideas,
> pointers etc???? possibly command line scripts for gimp????
>

if you are running php with the gd libraries

imagecopyresized()

ImageCopyResampled()

should do what you want,

otherwise 
jpegtopnm image.jpeg |  pnmscale [scale options] | pnmtojpeg -o
thumbnail.jpeg 

or something like that, should work on the command line

there is a whole raft of portable anymap programs designed to do this
sort of manipulation on the command line.

Of course it is much safer to use the image functions built into php if
possible.

-- 

Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 274 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011226/103970a6/attachment.pgp>


More information about the GLLUG mailing list