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.


crop outputs jibberish...help?

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


Joined: 09 Aug 2005
Posts: 3

PostPosted: Tue Aug 09, 2005 1:02 am    Post subject: crop outputs jibberish...help? Reply with quote

Hi, sorry to be a pain, but I am a php newbie...I've downloaded the sample files, but when I run test.cropinterface.php it loads fine with the image I want to crop. When I click the 'crop the image' button, it outputs some errors, and lots of junk, instead of an image...like this...

Notice: Undefined variable: position in c:\Inetpub\wwwroot\testpol\andyphp\class.cropcanvas.php on line 270

Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\testpol\andyphp\class.cropcanvas.php:270) in c:\Inetpub\wwwroot\testpol\andyphp\test.cropinterface.php on line 9
????JFIF??dl??U? ?W? B3CS???a??e?.?(????'$??XI??.?$.?l{?? ??XI(URr?6 u?GF??W? x?H??g ??,??1UV????4RB?????????-]??nm?E????CZ??pC??-????a0?T?F ?J6n??^ ?#W???wa??*A?1$??{

What am I doing wrong? Thanx much!
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 Aug 09, 2005 2:43 am    Post subject: Reply with quote

Hi, and welcome to the board!

This question has been answered a few times before. Pick any of these threads for details:

http://php.amnuts.com/forums/viewtopic.php?t=198
http://php.amnuts.com/forums/viewtopic.php?t=154
http://php.amnuts.com/forums/viewtopic.php?t=192
http://php.amnuts.com/forums/viewtopic.php?t=92

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


Joined: 09 Aug 2005
Posts: 3

PostPosted: Tue Aug 09, 2005 3:33 am    Post subject: Reply with quote

Thanx much Andy, but I've already read all of these (I should have said...) there's no whitespace in the files that I can see? Any other ideas?

thanks for your help.
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 Aug 09, 2005 9:42 am    Post subject: Reply with quote

Hi,

They also mention using the header() function to set the correct content-type for your image. Have you done that, too?

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


Joined: 09 Aug 2005
Posts: 3

PostPosted: Wed Aug 10, 2005 11:13 pm    Post subject: Reply with quote

Hi Andy, yes, I have the line 'header('Content-type: image/jpeg');' before the ShowImage function...I'm just using the sample code in test.cropimage.php

Sorry, I'm obviously very thick, and have changed something inadvertantly somewhere..thanx much for your help.

cheers
Janine
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 Aug 11, 2005 1:23 am    Post subject: Reply with quote

email me your code and I'll take a look... I'll need both classes and the test file.
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