andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Tricky Cropping & Resizing

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas
View previous topic :: View next topic  
Author Message
shaydez
Newbie


Joined: 06 Jan 2007
Posts: 2

PostPosted: Sat Jan 06, 2007 1:09 pm    Post subject: Tricky Cropping & Resizing Reply with quote

Hello I'm new here. I been researching your forum for a few days now looking for some answers and i don't think any one has tried what i'm trying to do and curious if its possible with your classes.

What i'm trying to do:
- Upload an Image
- Crop out white area of the image
- Resize to specific thumbnail size 200x200 (of course keeping the image proportioned)

I put out the steps on my website
http://www.shaydez.com/thelab/thumbnail/complex/steps.php

Is this possible to do with your class?

I hope that made sense.. Thanks!
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Sat Jan 06, 2007 8:08 pm    Post subject: Reply with quote

Hi, and welcome to the board!

The class.cropcanvas.php class contains a method that might help to automatically crop the image; cropByAuto. You just need to supply a threshold level (or don't supply any parameter to default to cropping based on white). This, of course, doesn't use the interface. If you use the interface then you have to make your own cropping area. Using the methods in the main cropping class do things without interaction.

To resize the image, look at the dropshadow class. Ignore the name; it's a powerful thumbnail class. Lots of posts have been made on this board about using it.

Here are some threads that might help out:

http://php.amnuts.com/forums/viewtopic.php?t=120
http://php.amnuts.com/forums/viewtopic.php?t=251
http://php.amnuts.com/forums/viewtopic.php?t=66
http://php.amnuts.com/forums/viewtopic.php?t=196
http://php.amnuts.com/forums/viewtopic.php?p=1045#1045

Check out php.net for info on how to upload files:

http://uk.php.net/manual/en/features.file-upload.php

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group