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.


CropToDimension position

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


Joined: 07 Feb 2006
Posts: 3

PostPosted: Tue Feb 07, 2006 4:59 am    Post subject: CropToDimension position Reply with quote

Hi

I have the crop working properly using the CropToDimension function
but no matter what position I pass it always crops from top right.

I've searched the forum but can only find people having the opposite problem Smile
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Tue Feb 07, 2006 9:56 am    Post subject: Reply with quote

Hi, and welcome to the board.

Can you perhaps put up the snippet of code you're using? Might help out trying to figure why it's messing up for you.

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


Joined: 07 Feb 2006
Posts: 3

PostPosted: Wed Feb 08, 2006 9:27 am    Post subject: Reply with quote

This is the code I have in my page, all the dimensions etc are put into variables, I have tried putting ccTOPLEFT in the cropToDimensions function after the dimensions but it still didn't work

Code:
require 'cropcanvas.php';

$cc = new canvasCrop();
                  
$cc->loadImage($newurl.$medianame);
                  
$cc->cropToDimensions($cropwidth, $cropheight, $currentwidth, $currentheight);
$cc->saveImage($newurl.$medianame);
                  
$cc->flushImages();
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Mon Feb 13, 2006 8:46 am    Post subject: Reply with quote

The only thing I can think of right now is that the variables you're passing to the method haven't been set in some way. Do they come from a form post and are you relying on register_globals? If so, are you sure it's turned on? Can you try just echoing those variables to make sure they have content, with a simple:

Code:
echo "$cropwidth, $cropheight, $currentwidth, $currentheight";


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