View previous topic :: View next topic |
Author |
Message |
stephenp Newbie
Joined: 31 Jan 2007 Posts: 3
|
Posted: Wed Jan 31, 2007 11:43 pm Post subject: Original Image does not appear in cropinterface |
|
|
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 |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Thu Feb 01, 2007 6:36 am Post subject: |
|
|
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 |
|
 |
stephenp Newbie
Joined: 31 Jan 2007 Posts: 3
|
Posted: Thu Feb 01, 2007 1:13 pm Post subject: |
|
|
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 |
|
 |
stephenp Newbie
Joined: 31 Jan 2007 Posts: 3
|
Posted: Thu Feb 01, 2007 1:17 pm Post subject: |
|
|
okay, working now. whoops.
thanks though. |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Thu Feb 01, 2007 1:33 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|