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.


cropToDimensions starts at position 0,0

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


Joined: 08 Jan 2004
Posts: 7

PostPosted: Mon Jan 12, 2004 7:57 am    Post subject: cropToDimensions starts at position 0,0 Reply with quote

The online example work greate, but when the script is running on my debian server (now with GD2 Smile ) and I start to use the crop interface.
The cropping starts at position x0,y0. The javascript get's the write position, I checked it wit Photoshop. But it seems when I use the "cropToDimensions" function, as used in the example, it does the cropping at starting point x0,y0.
Is this a php/gd related problem?
gr kleinejan
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 Jan 12, 2004 9:54 am    Post subject: Reply with quote

Hi there,

Possibly something to do with the version of GD used. I seem to recall at some point there was a version that didn't do the ImageCopyResampled function correctly (it ignored the srcX and srcY dimensions... GD 2.0.1 with possibly PHP 4.0.6, I think). As you can see from the demo on my site (using PHP 4.3.4 and the bundled version of GD) it seems to work:

http://php.amnuts.com/demos/crop-canvas/standard.php?show=cropToDimensions&position=4&sx=100&sy=100&ex=600&ey=350

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


Joined: 08 Jan 2004
Posts: 7

PostPosted: Tue Jan 13, 2004 9:38 am    Post subject: Reply with quote

So I installed a backport for php, and now cropping loads of images 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 Jan 13, 2004 9:51 am    Post subject: Reply with quote

kleinejan wrote:
So I installed a backport for php, and now cropping loads of images Smile


A backport? No idea what you're talking about there! Smile But it sounds like the class now works, which is great!

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


Joined: 08 Jan 2004
Posts: 7

PostPosted: Tue Jan 13, 2004 12:01 pm    Post subject: Reply with quote

Backport
for example Debian Woody come's with php 4.1.2 but if u need a newer php you can just install a backport that means php 4.1.2 will be replaced with another better one Wink
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