occasional image quality problems
ohthetrees
Joined: 2002-09-18
Posts: 20 |
Posted: Thu, 2002-09-19 07:01 |
When I upload a whole folder of pics it works pretty well, but about 1 out of 30 to 40 pics will be corrupted. Usually the thumb, normal, and full sized version will all be corrupted in the same way. So far I have seen one with a red tinge, one that looked foggy white over two thirds of it, one that was blank on the bottom half, and one that was very dark on the bottom half. I imagine netpbm might be to blame, although I did use the binaries provided on this site. mac os 10.2 php info: http://aliandcedar.com:400/info.php thanks |
|
Posts: 7994
If you re-upload the same image does it work?
Gallery doesn't touch the original file, so if the original is corrupted then that's the way that Gallery received it... that implies that what you're seeing is a file transfer corruption issue (which is rare, but it happens).
Posts: 20
if I re-upload, the picture turns out fine. However, the way I upload is to dump pictures into a staging directory on my webserver, then import using the url of the folder. So really gallery is uploading from the same site that it is running on. Where is the opportunity for corruption? If I look at the original (in the staging directory) it looks fine. The corruption happens between when I ask gallery to upload from a particular directory, and when it is posted. I have not noted any corruption on any pics when I upload them to my web server by other means.
thanks for your help,
cedar
update: my copy of gallery seems to be doing more than just uploading the full sized version of the picture. It seems to be creating a version that is the same pixel dimensions as the original, but is jpeg optimized to a different (more compressed) level than the original. So I seem to be getting three sizes total, a thumb, a medium sized, and an original sized version that is compressed. Am I on crack, or is this really happening?
Posts: 7994
When you upload from the same server, are you using a URL or a direct filesystem path? Gallery invokes different PHP commands for those two situations.
If it's a filesystem path, Gallery is using PHP's built-in copy() function to move the file. If it's a URL we do some slightly more complicated stuff. Either way, we're counting on PHP's system calls to get it right.
I'd suggest that you upgrade PHP from 4.1.2 to 4.2.3, since I know they made some improvements in this code in the 4.2.x line.
Posts: 20
I upload both ways, and experience corruption both ways.
I'm looking into upgrading php. I'm not quite up to compiling it myself, but marc liyanage has binaries posted on his website. He notes this:
do I care about this? Should I upgrade to 4.2.3 despite this complication?
An update to the corruption issue (it gets weirder).
Background: I have an album with 32 pics in it named pool 1-15 and farm 1-17. Of course there are thumbs, resized and full sized versions of each. You can look at this album yourself if you care to: http://www.aliandcedar.com/gallery/farm Reminder: I'm running OS X 10.2.
If I view my album using explorer pool1 and farm10 resized and farm16 full sized look corrupted
If I view my album using mozilla, pool2 resized and pool10 full size look corrupted.
Zero overlap!? This is reproducible. If I restart browsers, etc. I even navigated directly to my albums folder and looked at the pics directly in the browser, and still corrupted. If I look at the files using photoshop they all look fine. I compiled a more recent version of netpbm and things don't seem to have improved. I even installed the daily build of gallery on a different machine (configured identically) and experienced similar corruption problems. The only thing left is to replace php, then I throw up my hands.
Posts: 7994
Gallery 1.x does use this encoding type in the forms which upload image data, so
you should be ok.
That's odd. I just checked out pool1 resized, farm10 resized, farm 16 full using IE 6.0 and they looked fine to me. Are you sure you're not seeing a corrupted version of the image from your browser cache?
Posts: 20
you are right, it was a cached version. I was right clicking and hitting reload image, but that doesn't seem to have been enough. I cleared the cache and restarted the browser and things looked ok. However, the original corruption problem was real. I made three changes that could have fixed it. One, I started uploading using a file path, rather than a web address (easily testable.), two, I recompliled netpbm to a more recent version, and three, I updated my php module. Anyway, it all works now. Yipee!