Chrome浏览器在渲染小尺寸JPEG图像时呈现出与Firefox不同的视觉效果,这源于其采用的特殊优化技术。[1]Chrome通过Skia图形库调用libjpeg-turbo库进行图像解码,其中实现了partial IDCT scaling优化。[1]当图像缩放至特定比例(分母为8的分数)时,Chrome会计算最接近的此类分数比例进行解码,此时仅保留低频数据而跳过高频系数,导致渲染结果看起来更粗糙厚重。[1]
JPEG图像在8×8块级别进行频域转换(DCT),高频信息包含边缘细节和渐变等视觉元素。[1]通过partial IDCT scaling技术,Chrome在缩放过程中大幅丢失这些高频信息,从而实现性能优化。[1]鉴于这一特性,建议在图标等场景中应使用SVG格式而非JPEG。[1]
Chrome renders small JPEG images differently from Firefox due to an optimization technique implemented in its graphics pipeline.[1] The browser uses the Skia library for image decoding and rendering, which integrates libjpeg-turbo and employs a partial IDCT scaling strategy.[1] When a JPEG is scaled down to certain proportions—specifically those with denominators of eight as fractions—Chrome decodes only the low-frequency data while skipping high-frequency coefficients, resulting in a visibly coarser and heavier appearance compared to other browsers.[1]
This rendering difference stems from how JPEG compression works at a fundamental level.[1] JPEG images undergo frequency-domain transformation at the 8×8 block level using DCT (Discrete Cosine Transform), and high-frequency information—which captures details like edge sharpness and gradients—is largely discarded during the scaling process.[1] By calculating the closest fraction with a denominator of eight for the target size, Chrome's partial IDCT scaling optimization prioritizes decoding efficiency over visual fidelity for small images.[1] Content creators are advised to avoid using JPEG format for icons and similar graphics, where alternative formats like SVG would be more appropriate.[1]