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.


Fixed Area - No Area Resize

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


Joined: 21 Dec 2004
Posts: 12

PostPosted: Tue Mar 08, 2005 12:55 pm    Post subject: Fixed Area - No Area Resize Reply with quote

Hi!

How can i set the crop area to a locked value ex: 250 x 150

I dont want people to make smaller or bigger pics ... only 250 x 150!

But i still want the interface so they can choose witch part of the pic to crop! so they just can move the area but not make it smaller och bigger!

Greets // EssEt
Back to top
View user's profile Send private message Send e-mail
amnuts
Site Admin


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

PostPosted: Wed Mar 09, 2005 9:07 am    Post subject: Reply with quote

Hi EssEt,

Easy to do! Smile After you create an instance of the object (but before you output the interface), add these lines (assuming object is called 'ci'):

PHP:
<?php $ci->setResizing(false);
$ci->setCropDefaultSize(250150);
$ci->setCropMinSize(250150); ?>


You don't even really need the latter line, but it's nice to include just to be complete.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
sepultubob
Newbie


Joined: 13 May 2005
Posts: 9

PostPosted: Fri May 13, 2005 4:28 am    Post subject: Reply with quote

I try to do exactly the same than EssET, but there's no way !! Sad
Here is my code :
Code:
$ci->loadImage($_GET['file']);
     $ci->setResizing(false);
      $ci->setCropDefaultSize(500, 150);
      $ci->setCropMinSize(500, 150);
      $ci->cropToDimensions($_GET['sx'], $_GET['sy'], $_GET['ex'], $_GET['ey']);
      header('Content-type: image/jpeg');
      $ci->showImage('jpg', 100);
      exit;


I try to fix the size (500, 150), using the method you give up here, but I've no result...

Got an idea ? thanks
Back to top
View user's profile Send private message
sepultubob
Newbie


Joined: 13 May 2005
Posts: 9

PostPosted: Fri May 13, 2005 6:44 am    Post subject: Reply with quote

well, I got it working !!
In fact, my methodes were not put at the right place in the code, so it didn't work.
But it's ok now.
Back to top
View user's profile Send private message
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