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.


'saveShadow 'question

 
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 -> Drop Shadowed Thumbnail Creator
View previous topic :: View next topic  
Author Message
badre
Newbie


Joined: 22 Oct 2003
Posts: 4

PostPosted: Wed Oct 22, 2003 12:43 pm    Post subject: 'saveShadow 'question Reply with quote

I can't get it to save...only show, what am I doing wrong...beautiful though!

Thanks, B.


<?php

require "class.dropshadow.php";


$ds = new dropShadow(FALSE);
$ds->setShadowPath('./shadows/');
$ds->loadImage('./test.jpg');
$ds->resizeByPercent(50, 0);
$ds->applyShadow('ffffff');

$ds->saveShadow('./test2.jpg');
$ds->saveFinal('./test12.jpg');
$ds->showShadow('jpeg');

?>
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 Oct 23, 2003 5:19 am    Post subject: Reply with quote

Hi, and welcome to the board!

Hmm... I guess the first question would be; are you permissions okay on the directory you're trying to write to? You'll need to make sur eyou have write permissions for the PHP script.

Check that and let us know.

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


Joined: 22 Oct 2003
Posts: 4

PostPosted: Thu Oct 23, 2003 7:12 am    Post subject: Reply with quote

Yes, permissions are set 777..tried many ways around. no luck
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 Oct 23, 2003 7:52 am    Post subject: Reply with quote

badre wrote:
Yes, permissions are set 777..tried many ways around. no luck


Did you try with debugging on?

$ds = new dropShadow(true);

Did that give any indication of what might be wrong?

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


Joined: 22 Oct 2003
Posts: 4

PostPosted: Thu Oct 23, 2003 8:21 am    Post subject: Reply with quote

Debug message from function resizeByPercent: Image size is 400 / 300
Debug message from function applyShadow:Original image size = 400/300
Drop shadowed image size = 416/316.......................... That file cannot be saved with the function 'image'


???Thanks
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 Oct 23, 2003 9:34 am    Post subject: Reply with quote

Hmm.. That tells me that it could not automatically get the extension from the filename and so couldn't create the function name (imagejpeg, imagepng, etc.) to save the file. Try forcing the file type like this:

$ds->saveShadow('./test2.jpg', 'jpg');
$ds->saveFinal('./test12.jpg', 'jpg');

and see if tht helps out any.

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


Joined: 22 Oct 2003
Posts: 4

PostPosted: Thu Oct 23, 2003 10:12 am    Post subject: Reply with quote

That's It.!!!! I have it hooked into FlashMX, I'll send you a url next week. Thanks again, B
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 Oct 23, 2003 1:06 pm    Post subject: Reply with quote

Great! Looking forward to seeing it. Smile
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 -> Drop Shadowed Thumbnail Creator 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