- From: Rik Cabanier <cabanier@gmail.com>
- Date: Tue, 11 Nov 2014 10:35:48 -0800
- To: Tavmjong Bah <tav.w3c@gmail.com>
- Cc: Lea Verou <lea@verou.me>, www-style list <www-style@w3.org>
- Message-ID: <CAGN7qDCw+iaJtPUwJudBzVN+4VGZiv5czTzAFPnmh5BuwaRvhQ@mail.gmail.com>
On Sun, Nov 9, 2014 at 12:06 PM, Tavmjong Bah <tav.w3c@gmail.com> wrote: > On Sun, 2014-11-09 at 14:15 -0500, Lea Verou wrote: > > A colleague brought this [1] to my attention, which seems to > > demonstrate an image scaling bug in pretty much every browser I tried > > the testcase [2] on. Furthermore, the results across UAs are > > inconsistent, which might indicate a standardization opportunity. I, > > myself, have noticed similar errors when scaling down certain patterns > > in the past, so stumbling on these issues is not that rare. > > Applying different values to the image-rendering property seems to > > affect the results, but no value produces a correctly downscaled image > > (including the various properietary values…). > > > > > > Shouldn’t image-rendering: crisp-edges fix this? Is there any spec > > violation here at all, or is that part of image scaling undefined? Any > > thoughts? > > This has to do with using the srgb color space to do scaling. Scaling > should be done in a linear color space. 'crisp-edges' does not fix this > as it doesn't specify which color space to use. > > We briefly discussed this at the joint CSS/SVG meeting at TPAC last week > although this part doesn't seem to be minuted. (I showed the bottom of > [3] at the meeting.) High quality image processing software (Photoshop, > Gimp, etc.) has already moved to linear colors spaces, the web should > follow as resources permit. > I just installed GIMP and it doesn't seem to have this option. Instead, it just subsamples as usual. Do you know where to enable this in GIMP? > At the moment there is no CSS property to hint that a linear color space > should be used for scaling (actually, a linear color space should always > be used so a property should not be needed). SVG does have the > 'color-interpolation' property value 'linearRGB' to indicate > interpolation (as in gradients, animations, and alpha compositing) > should be done in a linear color space but nobody, that I know of, > implements it. (The SVG 'color-interpolation-filters' property value > 'linearRGB' is widely implemented as this is the default value for > filters.) > > Tav > > > [1]: http://www.4p8.com/eric.brasseur/gamma.html > > [2]: http://www.4p8.com/eric.brasseur/gamma_dalai_lama.html > > [3] http://tavmjong.free.fr/SVG/COLOR_INTERPOLATION/index.html > > > > > > > >
Received on Tuesday, 11 November 2014 18:36:15 UTC