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.


Hello, i have a problem with crazy signs!

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


Joined: 24 Aug 2004
Posts: 3

PostPosted: Tue Aug 24, 2004 3:50 pm    Post subject: Hello, i have a problem with crazy signs! Reply with quote

I?m german people. I try to write in english... Rolling Eyes Cool

I have a problem, i upload the original scripts on my server.
When i try the "test.cropinterface.php" and click "crop the image", the script show me only crazy signs...

Test it...http://www.darookies.de/kisses/upload/test.cropinterface.php

Hmm....

HELP please![/url]
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Wed Aug 25, 2004 2:35 am    Post subject: Reply with quote

Hi Damien, welcome to the board!

You're seeing odd characters because it's the raw data of the image. You will need to send the content-type in a header before you show the image, which means having a line like this if you're outputting jpg files:

header('Content-type: image/jpeg');

Also, make sure that you're not sending ANY characters - which includes white space - before the header. If you do this (and you're not buffering the content) then the content-type will be html.

Check this out. If in doubt, post up your test script in full.

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


Joined: 24 Aug 2004
Posts: 3

PostPosted: Thu Aug 26, 2004 2:04 pm    Post subject: Reply with quote

Code:
<?php
require_once 'class.cropinterface.php';
$ci = new cropInterface();
if ($_GET['file'])
{
$ci->loadImage($_GET['file']);
$ci->cropToDimensions($_GET['sx'], $_GET['sy'], $_GET['ex'], $_GET['ey']);
header('Content-type: image/jpeg');
$ci->showImage('jpg', 100);
exit;
}
?>
<html>
<head>
   <style type="text/css">
      body, td, p
      {
         font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
         font-size: 10px;
      }
      
      #submit
      {
         font-size: 10px;
         font-family: "MS Sans Serif", Geneva, sans-serif;
         height: 23px;
         background-color: #D4D0C8;
         border: 0px;
         padding: 3px,5px,3px,5px;
         width: 100%;
      }
   </style>
</head>
<body>

   <?php

      $ci->loadInterface('../bild/dummy.jpg');
      $ci->loadJavaScript();

   ?>

</body>
</html>



Hoi,
this is the code, im too stupid... Confused

Greets from Germany!
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Fri Aug 27, 2004 5:36 am    Post subject: Reply with quote

Okay, it looks good so far. A couple things for you to check:

Make sure there is NO whitespace before the opening '<?php' in the test file.

Make sure there is now white-space before the opening '<?php' or after the closing '?>' in the 'class.cropinterface.php' file.

By white-space I mean spaces, tabs, carriage returns, new lines, etc.

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


Joined: 24 Aug 2004
Posts: 3

PostPosted: Sat Aug 28, 2004 6:12 am    Post subject: Reply with quote

OH YES !!!!

A new lines over the <?php in class.cropcanvas.php !!!

Puh, many THX!!! Very Happy
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