PDA

View Full Version : upload and rethumb make solid black thumbs and microthumbs


wkitty42
19th of May 2004 (Wed), 13:09
i don't know why and haven't figured it out thru the 1.5 betas and RCs but, i've some jpg pics that just won't properly generate thumbs and microthumbs... i'm using GD2 built into my PHP... i've done this using both FTP settings, internal and PHP's ftp with no luck... the following log snippet is from an attempt with the PHP ftp functions...

msg 16641 | ftp: UPLOAD FINISHED SUCCESFULLY.
msg 16640 | ftp: LOCAL: DISCONNECTED
msg 16639 | ftp: LOCAL:
'candles4.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 64x48 microthumb (GD 64x48) , 737 B in server.
msg 16638 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/microthumbs'
msg 16637 | ftp: LOCAL: Changed to passive mode
msg 16636 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16635 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16634 | ftp: LOCAL: DISCONNECTED
msg 16633 | ftp: LOCAL:
'candles4.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 160x120 thumb (GD 160x120) , 1009 B in server.
msg 16632 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/thumbs'
msg 16631 | ftp: LOCAL: Changed to passive mode
msg 16630 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16629 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16628 | ftp: LOCAL: DISCONNECTED
msg 16627 | ftp: LOCAL:
'candles3.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 64x48 microthumb (GD 64x48) , 737 B in server.
msg 16626 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/microthumbs'
msg 16625 | ftp: LOCAL: Changed to passive mode
msg 16624 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16623 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16622 | ftp: LOCAL: DISCONNECTED
msg 16621 | ftp: LOCAL:
'candles3.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 160x120 thumb (GD 160x120) , 1009 B in server.
msg 16620 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/thumbs'
msg 16619 | ftp: LOCAL: Changed to passive mode
msg 16618 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16617 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16616 | ftp: LOCAL: DISCONNECTED
msg 16615 | ftp: LOCAL:
'candles2.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 64x48 microthumb (GD 64x48) , 737 B in server.
msg 16614 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/microthumbs'
msg 16613 | ftp: LOCAL: Changed to passive mode
msg 16612 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16611 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16610 | ftp: LOCAL: DISCONNECTED
msg 16609 | ftp: LOCAL:
'candles2.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 160x120 thumb (GD 160x120) , 1009 B in server.
msg 16608 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/thumbs'
msg 16607 | ftp: LOCAL: Changed to passive mode
msg 16606 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16605 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16604 | ftp: LOCAL: DISCONNECTED
msg 16603 | ftp: LOCAL:
'candles1.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 64x48 microthumb (GD 64x48) , 737 B in server.
msg 16602 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/microthumbs'
msg 16601 | ftp: LOCAL: Changed to passive mode
msg 16600 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16599 | ftp: LOCAL: Connected to '127.0.0.1'
msg 16598 | ftp: LOCAL: DISCONNECTED
msg 16597 | ftp: LOCAL:
'candles1.jpg' UPLOADED SUCCESFULLY
SIZE: 0x0 => 160x120 thumb (GD 160x120) , 1009 B in server.
msg 16596 | ftp: LOCAL: Working directory changed to '/TheGallery/Exhibits/randomartistic/thumbs'
msg 16595 | ftp: LOCAL: Changed to passive mode
msg 16594 | ftp: LOCAL: Logged in as 'exhibit_engine'
msg 16593 | ftp: LOCAL: Connected to '127.0.0.1'

what else can i do to see why this is happening?

when i do rethumbs, i have the setting to "select from the largest found" in the hopes that it will locate the normal sized pics in the default display directory and use them to generate the thumbs and microthumbs from... sadly, though, this doesn't appear to be happening... i have seen messages saying that the pic being worked on has been cached but i still get the black results...

the next question is this... if GD2 just doesn't like these images, what can i do, short of manually performing this resize task, to get these images fixed and uploaded... i'm tired of doing it manually :shock:

help! :(

Pekka
8th of June 2004 (Tue), 02:44
EE must know the original pixel size so that GD can resize it. It looks like the original size retrieval was failed, so the size parameters for GD were not correct.

PHP function "getimagesize" that checks the size seems to be picky about some JPEG formats. Problems with it seem quite random and vary between PHP versions.

In "SCRIPT_multipupload.php" you could try to change line 80

$original_image_info = getimagesize($fullsize_image,$info);

to

$original_image_info = getimagesize($fullsize_image);

but that is just a guess (has worked in some cases).

Your could also try smaller original size images. GD opens JPEG to uncompressed image in memory and it could be that it does not have enough memory available.

Try saving originals in different program or with different settings.

If you have a photo that refuses to work, let know know how you saved the original and it would also be nice if you could mail it to me for testing.

wkitty42
8th of June 2004 (Tue), 08:45
EE must know the original pixel size so that GD can resize it. It looks like the original size retrieval was failed, so the size parameters for GD were not correct.

PHP function "getimagesize" that checks the size seems to be picky about some JPEG formats. Problems with it seem quite random and vary between PHP versions.
hummm... i see where that is possible... i think i'll hold off on the code change, though... so as to remain as close to what you release as possible :wink:

Your could also try smaller original size images. GD opens JPEG to uncompressed image in memory and it could be that it does not have enough memory available.

Try saving originals in different program or with different settings.

If you have a photo that refuses to work, let know know how you saved the original and it would also be nice if you could mail it to me for testing.
the pics in question aren't that big... four i took with my camera and then saved to the computer... i don't think i edited them any... if so, it was probably to resize them down from 1024x768 to something more manageable... as for the JPG format, whatever paintshop pro uses is what i used... the other dozen or so were retrieved from within a Powerpoint presentation... i told powerpoint to create a html from the presentation and then went and grabbed the pics out of there... i'll send you one or two of the candle ones that i took... they're only about 26k on disk and maybe 900k in memory... can i pm them to you or better to use your real email address? you can pm that to me if you like...

Pekka
8th of June 2004 (Tue), 09:06
My mail is "pekka AT this domain" :)

wkitty42
11th of June 2004 (Fri), 18:27
My mail is "pekka AT this domain" :)
just sent them to this address...

wkitty42
18th of June 2004 (Fri), 14:29
FWIW: i've just upgraded my php from 4.3.4 to 4.3.7... in looking at the changelog, i see that there have been at least two updates to the GD library code used in php4... this might take care of this problem, but i'm not sure and don't have time to test right now... in any case, this is just a FYI...

have you figured out anything with the ones i sent you, pekka?