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.


Cannot get cropcanvas to work! (blank screen)

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


Joined: 20 Feb 2005
Posts: 2

PostPosted: Sun Feb 20, 2005 3:49 pm    Post subject: Cannot get cropcanvas to work! (blank screen) Reply with quote

Hello Andy!

First of all, thanks for your non-commercial work!

I?m developing some kind of tools in PHP, but i?m not an expert (but a fool neither)

I?ve downloaded all files (class.cropcanvas, class.cropinterface, test.cropcanvas, .js and .png) and my server is supporting GD too.

But when I start the file, i only get a blank screen. then i deleted the # in the file, so that it was a comment no longer! I pasted the code in an other file too, but the best thing i got was a warning about the file size!

Please, i?m ashamed not to get this thing to work, but help me Smile
How can i use the interface? i?m afraid it?s not as easy as i hope to get the thing done, getting a standalone image manipulation tool


It would be great if anyone "wants" to help me!

thanks in advance
grange
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Sun Feb 20, 2005 4:45 pm    Post subject: Re: Cannot get cropcanvas to work! (blank screen) Reply with quote

Hi Grange, and welcome to the board!

grange wrote:
I?ve downloaded all files (class.cropcanvas, class.cropinterface, test.cropcanvas, .js and .png) and my server is supporting GD too.


I hope you rememberd test.cropinterface.php, too. That one will be especially handy when you want to try out the interactive crop canvas.

grange wrote:
But when I start the file, i only get a blank screen. then i deleted the # in the file, so that it was a comment no longer! I pasted the code in an other file too, but the best thing i got was a warning about the file size!


Okay.... huh? What # did you remover and from what file??

grange wrote:
How can i use the interface? i?m afraid it?s not as easy as i hope to get the thing done, getting a standalone image manipulation tool


Usually when things don't work quite as people expect it comes down to a few things that have already been covered on this board. So, things to try out:


  • Make sure that you have a sufficient version of PHP and GD.
  • Make sure there is no white-space outside of the php tags in the classes.
  • Turn on debugging when you instantiate the class.
  • Try using error_reporting(E_ALL) to get PHP to tell you if things are causing problems.
  • When trying out the test scripts, make sure that you have the files around it's refering to (even image names, and so on, which will undoubtedly need to be changed because I can only put in an example and don't know everyone's setup or filenames).
  • Make sure all the permissions on the files.folders are enough for your web server to be able to read the scripts and write to the folders if you're doing that.


There, that should be enough to get you started. Smile

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


Joined: 20 Feb 2005
Posts: 2

PostPosted: Sun Feb 20, 2005 5:24 pm    Post subject: Reply with quote

hello again! thanks for your advise!

i?m using php 4.0.6 and "GD Version 1.6.2 or higher"

i really forgot the test.interactive.php, i?ve downloaded it now and - what a miracle - i see the interactive demo, the crop-area isn?t transparent, but i don?t care about this at the moment.

the bigger problem is, that cropping doesn?t work. the picture only loads again if i press "crop image" after selecting the area.

*) the # i?ve removed were from class.cropcanvas.php

PHP:
<?php // Example of use
//
//  require 'class.cropcanvas.php';
//  $cc = new canvasCrop();
//
//  $cc->loadImage('original1.png');
//  $cc->cropBySize(100, 100, ccBOTTOMRIGHT);
//  $cc->saveImage('final1.png');
//
//  $cc->flushImages();
//
//  $cc->loadImage('original2.png');
//  $cc->cropByPercent(15, 50, ccCENTER);
//  $cc->saveImage('final2.jpg', 90);
//
//  $cc->flushImages();
//
//  $cc->loadImage('original3.png');
//  $cc->cropToDimensions(67, 37, 420, 255);
//  $cc->showImage('png');
// 
?>


*) then, what do you mean with white-space outside php-tags?
maybe my english isn?t well enough to understand Smile

*) i tried another couple of useless things and still get a blank screen when loading test.cropcanvas

PHP:
<?php if ($cc->loadImage(dirname(__FILE__). '/original.png'))
  {
    
$cc->cropBySize('100''100'ccBOTTOMRIGHT);
    
$cc->saveImage(dirname(__FILE__). '/final1.jpg');
    
$cc->flushImages();
  } 
?>



I really tried to understand what it does, but i didn?t succeed understanding what it is for! i tried chancing original.png to a image in my folder, but i still get a blank screen!

it?s late and i?m tired, so please don?t worry about the crap i write Smile


thank you for your advise... and the best greetings from austria!
grange
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