 |
|
|
|
 |
LeopoldStotch
Suapremae tranecadictt

Registered: Jan 2005
Location: Yawbs,Giaks,and Automobiles
|
|
|
Re: PHP experts: could you help me out?
| quote: | Originally posted by Lira
After spending nights awake trying to find out what's wrong, I decided to ask you guys for help...
... this is from a gallery I'm developing for a friend of mine. He sends the pictures through a form and this script should take care of them.
However, for some reason I can't understand, the thumbnails are always on 256 colours (and I've used imagecreatetruecolor) and the descriptions disappear. Why?
|
nice concept. Thumbs up to you.
As for your problems, multiple issues could be at fault for the results you are getting.
if your thumbnails are in 256 colors, i don't think this is a PHP issue, but rather than a system issue. Check to make sure your system has the correct display settings, etc . Since you are storing the files outside of MySQL by using the file system to save the pictures, this is a seperate issue outside of PHP/MySQL. Another issue could be the copy() function from Perl. I think Perl has a more complex function for copying complex binary files from one area to another area . Check the documentation.
As for the lost description, why do you need to call addslashes() to add to the SQL statement ? Is there some special notation you are trying to setup ? If that's not the problem, there's always the issue that you have 'photo_desciption' declared twice. Check that too.
Good luck.
___________________
|
|
Jun-14-2006 06:04
|
|
|
 |
 |
Lira
Ancient BassAddict

Registered: Nov 2001
Location: Brasilia, Brazil
|
|
|
Re: Re: PHP experts: could you help me out?
| quote: | Originally posted by LeopoldStotch
nice concept. Thumbs up to you.
As for your problems, multiple issues could be at fault for the results you are getting.
if your thumbnails are in 256 colors, i don't think this is a PHP issue, but rather than a system issue. Check to make sure your system has the correct display settings, etc . Since you are storing the files outside of MySQL by using the file system to save the pictures, this is a seperate issue outside of PHP/MySQL. Another issue could be the copy() function from Perl. I think Perl has a more complex function for copying complex binary files from one area to another area . Check the documentation.
As for the lost description, why do you need to call addslashes() to add to the SQL statement ? Is there some special notation you are trying to setup ? If that's not the problem, there's always the issue that you have 'photo_desciption' declared twice. Check that too.
Good luck. |
Thanks 
Anyway, the problem of using Perl in this case is that I don't know anything about it, and learning a whole new language because of a bug sounds a bit drastic, doesn't it?
As for the description, I used addslashes() for security measures, although I now realise it might not be necessary in this case, as you pointed out. And about declaring it twice, don't I need to do that in order to create the array?
___________________
Indiana Clones Upcoming Sets
[ I May Upload Something Someday ]
|
|
Jun-14-2006 07:15
|
|
|
 |
 |
|
 |
 |
Lira
Ancient BassAddict

Registered: Nov 2001
Location: Brasilia, Brazil
|
|
|
Thanks for your replies 
| quote: | Originally posted by Rostros
Just Install Imagemagick on your Server, it is available for WIN32 and UNIX servers and it is Free, it has many functions for .PHP Image processing and uses a lot less resources. |
Yeah, I guess that's what I will end up doing. I don't know whether my mate's server supports this but I've been delaying this for ages because of these bugs 
I'm going to give it a shot, cheers 
| quote: | Originally posted by Rostros
Agreed, I'm using perlmagick to do background image processing on a site I am working on and it works wonders...
BUT
A lot of shared hosting dont have the php extension of imagemagick installed so GD is the only way to go.
Thats a pretty creative way of calling the write functions too.... but I don't know why its doing 256 colors if you are using ImageCreateTrueColor().
Try not calling the image write functions the way you do (as in use the direct imageJPG or imagePNG etc functions) and see if for some reason GD just dosn't like being called that way.
You know I have written two different image gallery scripts.
My older one, Mobile, seems to be very similiar to this if you would like to see the code for it I can post up a zip of the source sometime. I think its under as MIT License (very similiar to a BSD Liscense) so you can use the code however you want. |
I learned that method from a tutorial, hehe Before trying imagemagick, I'm going to try another way of calling the write functions then, thanks.
Could you send it through yousendit then? That would be easier I guess, wouldn't it? My e-mail is lira dot becape at gmail dot com 
| quote: | Originally posted by pkcRAISTLIN
since you made the world cup sigs & this thread illustrates your obvious qualifications, youve just edged out yan as my favourite TA nerd |
I'm flattered, Yan rules 
___________________
Indiana Clones Upcoming Sets
[ I May Upload Something Someday ]
|
|
Jun-14-2006 17:12
|
|
|
 |
 |
LeopoldStotch
Suapremae tranecadictt

Registered: Jan 2005
Location: Yawbs,Giaks,and Automobiles
|
|
|
Re: Re: Re: PHP experts: could you help me out?
| quote: | Originally posted by Lira
Thanks 
Anyway, the problem of using Perl in this case is that I don't know anything about it, and learning a whole new language because of a bug sounds a bit drastic, doesn't it?
As for the description, I used addslashes() for security measures, although I now realise it might not be necessary in this case, as you pointed out. And about declaring it twice, don't I need to do that in order to create the array? |
1. . yes that is a good image rendering tool .
2. about declaring it twice, i overlooked the fact that you are passing multiple images into this page, which means multiple descriptions. My bad. 
___________________
|
|
Jun-14-2006 18:09
|
|
|
 |
All times are GMT. The time now is 21:30.
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
|
HTML code is ON
vB code is ON
[IMG] code is ON
|
|
|
|
|
|
Contact Us - return to tranceaddict
Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
|