Why is Firefox so bad at resizing images?

前端 未结 7 887
忘掉有多难
忘掉有多难 2020-12-02 14:19

On the left is the original PNG and on the right are versions reduced to roughly half the orignal size using and height. See [Link re

7条回答
  •  一个人的身影
    2020-12-02 14:59

    I think your answer is in the link from above https://developer.mozilla.org/En/CSS/Image-rendering: 'Currently auto and optimizeQuality are equal by default, both result in bilinear resampling.' 'default value IE8+: bicubic (high quality)'

    Next see: http://www.codinghorror.com/blog/2007/07/better-image-resizing.html 'When making an image smaller, use bicubic, which has a natural sharpening effect. You want to emphasize the data that remains in the new, smaller image after discarding all that extra detail from the original image.'

    I can think of a couple of possible workarounds, but neither are simple:

    1. Resize the image on the server. Either serve it up at half size, and allow Firefox to scale it up to full (which presumably it will be ok at), or have different URLs for the different sizes of image.
    2. You may be able to make this work in the browser with plugins (but the example I found doesn't actually do what you need, so I've removed it).

提交回复
热议问题