I've been uploading quite a few pics in the last day for a new thread I started and I'm noticing a problem with some of the images, mainly some of the most recent ones I've uploaded. The picture is fine on my computer, super sharp, but when uploaded to the server, there is horrible pixelation of the contours in the image, i.e. the girl's face. Why would this be? Here is an example:
Our image resizer manipulates images. We compress them to a low quality JPG/PNG when resizing. If the image is more than 600px wide we resize it. If your image is over a certain file size even if it's less than 600px we will compress those as well. This is an effort to save bandwidth on our end.
Drew, Read this thread. For some reason, RP was uploading pics that were still 1024-pixels wide when they posted on ADT. As you will read, I took them down, re-sized them to 600-pixels wide myself, then re-posted them in order to clear-up the skewing in the rendering of the page they were causing. Any idea how pics that large made it through in the first place?
I've noticed the same thing that jrsl76 is talking about. I know about the resizing and compression, and I've tried to resize on my own to avoid it, but with some pictures it happens no matter what I try. When it's too bad, I just end up not posting those images. Which is probably just as well, the forum is getting a bit image heavy these days.
The quickie image uploader resizes to 800px wide, I screwed up and said 600. The multi-image uploader does 1024x768 images. It's by design. So if someone uses the multi-uploader and then posts the image in the forum it will be wider than the quickie uploader linked from the forum. It's no big deal.
Yes, the image in the thread will scroll to the right. BUT, when trying to post to the thread, everything starts disappearing behind the left-side column menu -- such as the "Post New Reply" button -- stopping the thread dead-in-its-tracks. IE6. (Fully up-to-date... fuck IE7)
Another thing I've noticed is that this resizer of yours does particularly poor job when it has only a little resizing to do.. so to speak. For example: the 1st picture below was uploaded in original size (which was something like 120 hex 2400). The downscaled version made by ADT looks fairly decent. However, I resized the 2nd picture manually to 800px wide, and then uploaded it. It was then further resized by ADT to 600px wide and it looks much crappier. You can especially see the jagged edges on Lindsey's right hand. 1st pic has much less of those.
I assume that's related to re-compressing a previously compressed file. What compression level did you use when you resized the second photo to 800px wide? Just curious. I coded our image resizer to save bandwith, image quality was a secondary concern. I noticed the file sizes of each image are similar but the image quality is quite different. Double-compression could cause this. If we were a content site charging people to spank it to photos and videos I'd look at this image quality issue a bit differently. But since we're a free site paying the bandwidth bills through advertising and affiliate revenues we have to make compromises.
Using Adobe Photoshop Elements, I always take the time to re-size to 600-pixels wide and/or crop to 600-pixels wide (to avoid re-sizing) and/or a combination of both. I have always found that, when re-sizing to the final allowable image size on your own -- thus keeping the automatic re-sizer out of the process altogether -- the results are almost indistinguishable from the original source pic. For that matter, a lot of Internet source pics download as bitmap's now, and I need to be in Photoshop Elements converting them to JPEG's anyway, so it is no big deal to do the re-sizing as well. Oh, and did I mention that I'm anal-retentive with this kind of stuff?
Re-compression is only partially a problem. I think the main issue is resampling (pixel interpolation)... or lack thereof. I saved the 2nd image with 100% quality (minimal compression level). Here's the 600px version of my 800px pic, only resized in Infranview. I assume ADT resizer let it through without modifications. You can see that it's still pretty smooth. A bit blurry but you don't have those clear jagged/wavy edges that ADT resizer produces for some reason.
Compression really shouldn't affect image quality that much unless it's really serious compression. Jpeg files can be compressed quite a bit without losing a lot of quality. I don't think the compression is the problem. It must be something else. Edited - Apparently, I forgot whatever the other issue was. Edited by - randomprecision on 1/14/2009 5:34:24 PM
I just looked at the code. I'm apparently not compressing the images as much as I thought. The default is currently 90. I think the jagged lines are being caused by me forcing 72 DPI before saving the image on our end. I just commented that line of code out. Give it a shot to see if the pixelation problem goes away.
Looks like it still has the same problem. Maybe I need to switch to a different image manipulation library. I doubt I will but I think that's the only thing that will address this issue.
I made one change to the code. I now regenerate the full color palette after resizing, before saving the file to disk. It looks better to me when testing.
I see. And your image resizer, is that some kind of a ActiveX dll? I am not very well familiar with ASP and stuff. I wonder if it would be possible to implement freeimage dll which is free, and has (AFAIK) great resizing capabilities with all standard resampling filters (i.e bicubic, lanczos3).