Jump to content

vertical thumb,resizing and quality issue.


uisneach

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

 

;)

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.