|
|
#1 (permalink) |
|
Registered User
Comfy Contributor
Joined in Jun 2005
Lives in Singapore
Hosted on Pass15
120 posts
Gave thanks: 2
Thanked 0 times
|
I want to upload jpgs and save in them in 2 sizes - big and small. the GD is giving me images with those "waved" and "smudged" edges which are not desirable. I wonder how i can improve them.
this is what i am using: Code:
$src_img = imagecreatefromjpeg($tempName); $origw=imagesx($src_img); $origh=imagesy($src_img); $new_w = '400'; $ratio=$origh*$new_w; $new_h=$ratio/$origw; $dst_img = imagecreatetruecolor($new_w,$new_h); imagecopyresampled ($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx ($src_img),imagesy($src_img)); $thumb_target = $directory . $realName; imagejpeg($dst_img, $thumb_target); I have the whole list of functions for processing images but I don't know how to start using. Do i need to include a path to the ImageMagick library or what? can some one enlighten me please.... thanks in advance! Last edited by JakeSee; October 23rd, 2006 at 2:44 AM. |
|
|
|