For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Mike Gale found this great link on PNG's and color issues. I've noticed color discrepancies myself, mainly by noticing that the color of some PNG images was showing differently in different browsers and also potentially differing against the same image saved as GIFs and JPGs.
There is no way of making PNG images that match CSS colors in all PNG-supporting browsers. This reduces the usefulness of the otherwise excellent image format. If the image colors and the colors defined in a style sheet need to match, it is safer to use GIF or JPEG. If you want to use PNG and don’t care about older browser versions (pre-Tiger Safari in particular), the best course of action is removing all the color space information from the PNG files. If you only want a match with the background color, you could make the background a PNG image as well.
I didn't notice a difference with the images saved with Adobe Photoshop Element's "Save for the Web" feature, though I didn't look all that closely.
One thing that was interesting is that even using the "-brute" option to test more than 100 different compression settings to see which one is the best for the particular image, the image size was only reduced by about 1% (one image up to 1.3%), so it seems like Adobe Photoshop Element's "Save for the Web" feature (version 10) does a decent job at saving well-compressed PNG's.
Another thing that can be useful. Save the same image as PNG, GIF and JPG. Look at them and decide what to do. (You might need to use use several JPG's.) I'm still sometimes surprised when I do this. It can find a best format that I didn't expect! (It would be easy to add some pngcrush variants to the list!)
I use Paint.Net for image editing and always save my PNG's with the "Optimized PNG" plugin. For the most part it works nicely, but I still like to glean that extra few bytes by uploading to Smush.it.
I have seen where certain colors were off in Firefox until I Smushed the image.
Thanks Mike. That's an interesting suggestion for a future version, especially if there was an easy way to get information about the jpeg with jpegtran.
Do you mostly check sites using HTTP? Or do you mostly check local html & css files (using file paths and no HTTP)?
There's a file called jpg9exe.zip from "Independent JPEG Group" which contains tran and other things. Looks like it's as live as it needs to be, last release a year ago. I haven't evaluated it for this idea, but think it's all doable from that.
On where I validate from, the easy answer is both. (The more complex answer is it goes through phases, sometimes mostly local sometimes not. The most important image validation is probably done locally!)
Thanks Mike. I may look into this for v15 later this year (given the time) and see if it's not too difficult to implement & integrate some type of local image checking using that tool or some other freely available command line image processing/analysis tool.