I've searched the archives on this and, while I have turned up some tips, they don't seem to solve my problem.
I an building a website for an indigenous organisation where jpg images are uploaded, resized to a standard format, and thumbnails also generated at the same time (so that is two resizes for each image). Most of the time this works OK, but there are a lot of pages where many thumbnails are just blacked out, eg:
http://waru.org/arakuwaritja.php?p=63
On some pages, all images are blacked out, eg:
http://waru.org/arakuwaritja.php?p=36
whereas on others they're all OK, eg:
http://waru.org/arakuwaritja.php?p=43
The people in the field taking and uploading the photos insist that the format, color depth, etc, is not changing from photo to photo, and I can't discern any differences. Yet some work, some don't.
I read somewhere that memory limitations could cause this, but still, it only happens sometimes and not others. We are on a crowded shared server I think.
I'm use ImageCreateTrueColor() after checking with ImageIsTrueColor(), otherwise just ImageCreate(). The initial resizes almost always work (down from 640x480 to 400x300), with the thumbnails it is looking like a 50% failure rate.
Try to always use ImageCreateTrueColor() - even if the original has only 255 colors the thumbnails might have more.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php