| View previous topic :: View next topic |
| Author |
Message |
DAMIEN Newbie
Joined: 24 Aug 2004 Posts: 3
|
Posted: Tue Aug 24, 2004 3:50 pm Post subject: Hello, i have a problem with crazy signs! |
|
|
I?m german people. I try to write in english...
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 |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Wed Aug 25, 2004 2:35 am Post subject: |
|
|
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 |
|
 |
DAMIEN Newbie
Joined: 24 Aug 2004 Posts: 3
|
Posted: Thu Aug 26, 2004 2:04 pm Post subject: |
|
|
| 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...
Greets from Germany! |
|
| Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Fri Aug 27, 2004 5:36 am Post subject: |
|
|
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 |
|
 |
DAMIEN Newbie
Joined: 24 Aug 2004 Posts: 3
|
Posted: Sat Aug 28, 2004 6:12 am Post subject: |
|
|
OH YES !!!!
A new lines over the <?php in class.cropcanvas.php !!!
Puh, many THX!!!  |
|
| 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
|