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.


Saving anomolies

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


Joined: 24 Feb 2005
Posts: 4

PostPosted: Thu Feb 24, 2005 6:38 pm    Post subject: Saving anomolies Reply with quote

Hi I'm new here.

I'm having some really bizarre problems with saving cropped images. Basically, I can save the image when the path is specified directly like in $path2, but when I append string variables (the file name) to the path like in $path and pass it into the saveImage function, nothing is saved. So passing in $path does not work, passing in $path2 works. Please help me!


Here's the code:



$image = "test.jpg";

$path="miscImages/".$image;
// $path2="miscImages/blah.jpg";


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);
// $ci->saveImage("miscImages/{$_REQUEST['file']}", 100);

$ci->saveImage($path, 100);


exit;
} else {
$ci->loadInterface("originalImages/$image");
$ci->loadJavaScript();
}
Back to top
View user's profile Send private message
Ham
Newbie


Joined: 24 Feb 2005
Posts: 4

PostPosted: Fri Feb 25, 2005 2:07 pm    Post subject: Reply with quote

I circumvented the problem by assigning a random file name.
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