icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old October 23rd, 2006, 2:39 AM   #1 (permalink)
Registered User
Comfy Contributor
 
Joined in Jun 2005
Lives in Singapore
Hosted on Pass15
120 posts
Gave thanks: 2
Thanked 0 times
Question how to start using ImageMagick for PHP?

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 googled and read many recommendations on ImageMagick, but i just couldn't find instructions on how to even start writing the PHP script for it.

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!
__________________
Regards,
Jake See
Pass15:
http://www.vuox.com

Last edited by JakeSee; October 23rd, 2006 at 2:44 AM.
JakeSee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On