![]() |
Help! PHP / GD thumbnail creation
Can anyone see anything wrong with this code?
Code:
function do_thumbs( $fn ){ Subway |
Subway
In my (little) experience with GD, this is usually due to a corrupt (or less than perfect) image file. Have you tried other images from different sources? Is there any indication in the php error log (assuming you have one)? |
Would have edited previous message, but option was not there as it was a "Quick Reply"
Any way, I played with this and moved the imageCreateFromJPEG function above the image sizing functions. Also used full paths. So try this: Code:
function do_thumbs( $fn ){ |
Ya I got it figured out finally. My host had error messages turned off so it was a pain in the ass to figure out.. I finally got GD set up right on my local test bed and it all started making sense |thumb. Here's the 'finished' code if anyone ever needs it.
Code:
function do_thumbs( $fn ){ |
One quick question...
Why are you making the final thumbnails world writable and executable? (chmod 777)? |
Because when theyre created by php they're owned by apache and I cannot delete or rename them via FTP. I have a tendancy to change my mind about stuff all the time so I tend to run in to situations where I need to do something with them... no other reason.
|
I use basically the same code. Only difference is that I use imageCopy() instead of inmageCopyResampled().
|
Quote:
Just noticed this: Quote:
In response to your earlier reply: chown(new_image, username); |
All times are GMT -4. The time now is 02:46 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc