Jump to content

Recommended Posts

Hello ;)

 

My aim is to resize pics for ex. 120x90 ,(or 100x70)no matters

 

Anyway, i am not a php programmer , but i understand thebasis

i found this free script on the net that partially satisfy my aim.

 

 

list($width, $height, $type, $attr) = getimagesize($_SERVER['DOCUMENT_ROOT'].'public/foto/'.$ultimo_id.'.jpg');

 

// Create version "120*90" of picture(thumbnail)

$thumb = imagecreatetruecolor(120, 90);

$source = imagecreatefromjpeg($_SERVER['DOCUMENT_ROOT'].'public/foto/'.$ultimo_id.'.jpg');

imagecopyresized($thumb, $source, 0, 0, 0, 0, 120, 90, $width, $height);

 

the result is that the quality of thumb is  not amazing, and i can only resize horizontal image.

Has anyone of  you experts any clue to how resize in better quality (probabily using % instead of fixed dataof width) starting from only a

data fixed (height)?

in which way i might resize also the vertical images?

Thx in advance to all

 

;)

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.