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.


Proportional Crop?

 
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
Ghaagsheblah
Newbie


Joined: 15 Jan 2004
Posts: 3
Location: Sweden

PostPosted: Tue Jan 20, 2004 8:26 am    Post subject: Proportional Crop? Reply with quote

Is there any way to set a "fixed" height and width when cropping a image by Proportional when using the crop interface?

At the moment the proportional cropping is based on the original size of the image but i need to crop the image to be a specific height compared to the width. For example if the width is 100 pixels the height needs to be 133, or if the width is 200 then the height needs to be 266 and so on.

Best regards
Nicklas
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
amnuts
Site Admin


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

PostPosted: Tue Jan 20, 2004 9:54 am    Post subject: Reply with quote

Hi there,

Indeed there is a way! Smile First you will probably want to set resizing off if you only want to give people a fixed size and don't want them to change it. That can be done with the function setResizing, such as:

$ci->setResizing(false);

Then you'll want to set the default size of the crop to be whatever you want. You can determine what the height/width should be, and then use the setCropDefaultSize function, such as:

$ci->setCropDefaultSize($width, $height);

With those two functions used the person shouldn't be able to resize the crop, but will be able to move it around to find the best cropping area that they like, based on the dinemsions you've set.

HTH

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