Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Using Photoshop CS4 'Save for Web & Devices' -- I can tell with the Color Table how many colors are in use in the PNG-8, but am not sure how much downsampling to 256-colors is reducing the color depth of my image.

Cheers

share|improve this question

migrated from stackoverflow.com Jun 21 '11 at 19:26

This question came from our site for professional and enthusiast programmers.

2  
The only way to know is to try it and look at the results. –  Mark Ransom Jun 15 '11 at 19:24
    
Pretty subjective -- any tools out there that count colors in PNGs? –  Craig Jun 15 '11 at 22:27
2  
Counting colors won't help, as it won't tell you if the colors dropped are similar to the starting colors or not. You can subtract the 8-bit result from the original, but again it's going to be a subjective measure. –  Mark Ransom Jun 15 '11 at 22:34
    
Try converting 24 to 8 and back to 24 then you can compare the results byte for byte. –  Chris Nava Jun 21 '11 at 20:08

1 Answer 1

You can measure it with ImageMagick:

compare -mertic MSE original-input.png degraded-input.png difference-output.png

or with DSSIM:

dssim original-input.png degraded-input.png difference-output.png

MSE is mean square error and DSSIM is structural (dis)similarity metric. The latter is a bit more closely aligned with human perception of image degradation, but both are just estimates.

Also when you convert images to 256-colors with latest version of pngquant it will show MSE in verbose mode:

pngquant -v image.png
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.