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.


Original Image does not appear in cropinterface

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


Joined: 31 Jan 2007
Posts: 3

PostPosted: Wed Jan 31, 2007 11:43 pm    Post subject: Original Image does not appear in cropinterface Reply with quote

When I do a $ci->loadInterface('foo.jpg') I just get a broken image in the original image box on the interface.

Happens only on one particular server - running PHP5. Problem?

Did notice that the <img src=... in the crop interface is set to "inc.cropimage.php?f=test.jpg&s=400x300" and not just the image file.

The odd this is that it does work. It crops in the correct place and all, it just doesn't show the preview... kinda hard to see what you're doing.

great script btw.
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Thu Feb 01, 2007 6:36 am    Post subject: Reply with quote

Hi, and welcome to the board.

First off; is the path to inc.cropimage.php correct? Ie, is it in the same directory as the page you're viewing the crop interface from? If not ,try adjusting the class so it puts the full path to the cropimage file.

Secondly; have you tried access the inc.cropimage.php directly with the same parameters. Ie, going to the url http://www.yourserver.com/your/path/inc.cropimage.php?f=test.jpg&s=400x300. Does that work? If not, then it might not be able to read the image (test.jpg would need to be in the same directory as inc.cropimage.php), or the cropimage file might not be readable. But accessing it directly should give some clue as to any notices/error messages from 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
stephenp
Newbie


Joined: 31 Jan 2007
Posts: 3

PostPosted: Thu Feb 01, 2007 1:13 pm    Post subject: Reply with quote

I got this one:

Warning: Wrong parameter count for imagecopy() in /virtual2/nss/chapters/htdocs/isdc/2007/class.cropinterface.php on line 546

Heres the offending line:

imagecopy($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $w, $h, imagesx($this->_imgOrig), imagesy($this->_imgOrig));

Odd, since this should be running through the php5 parser...
Back to top
View user's profile Send private message
stephenp
Newbie


Joined: 31 Jan 2007
Posts: 3

PostPosted: Thu Feb 01, 2007 1:17 pm    Post subject: Reply with quote

okay, working now. whoops.

thanks though.
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Thu Feb 01, 2007 1:33 pm    Post subject: Reply with quote

Actually, that is a bug right there. It should be imagecopyresized() and not imagecopy() - I'll need to fix that in the code.

As it's now working for you I guess it's now running through PHP5 and so you have the latest GD with true colour support and so don't run in to the imagecopy function mistake.

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