This topic is locked

Create Thumbnail from image link

6/27/2007 5:08:40 PM
PHPRunner General questions
C
chaz author

is it possible to create thumbnails from a link to external image??

Alexey admin 6/28/2007

Hi,
you can implement this manually with Before record added/updated events.

I.e. you have two fields

URLof VARCHAR type and IMGof BLOB type.

On Add page user will enter a URL to the image and a thumbnail will be saved into IMG field.
Here is the sample code for event:

$img = file_get_contents($values["URL"]);

$ext=substr($values["URL"],strlen($values["URL"])-4);

$values["IMG"]=CreateThumbnail($img,200,$ext);

A
asimha 6/28/2007

Is there a "quality" parameter to the CreateThumbnail function ?

Alexey admin 6/28/2007
C
chaz author 6/28/2007

Hi,

you can implement this manually with Before record added/updated events.

I.e. you have two fields

URLof VARCHAR type and IMGof BLOB type.

On Add page user will enter a URL to the image and a thumbnail will be saved into IMG field.
Here is the sample code for event:


thanks for that i give it a shot