| Why tiny JPEGs look different in Chrome(guillaumetech.github.io) | |
| 332 points by gutechh 9 days ago | 68 comments | |
tl;dr: Chrome (via Skia and libjpeg-turbo) optimizes small JPEG rendering using partial IDCT scaling: instead of fully decoding a JPEG and downsampling, it decodes directly at fractions with denominator 8 by discarding high-frequency DCT coefficients, then does traditional scaling for the rest. For tiny images, this can mean only the constant (flat color) component of each 8×8 block survives, dropping edge detail and gradients—making icons look thicker or different than in Firefox. Lesson: don't use JPEG for icons; it's optimized for photos. | |
HN Discussion:
| |