5 ms·
Enough has been said about incorrect gamma (this and [0]), now I think it's high time to bash the software of the world for incorrect downscaling (e.g. [1]). It
by ansgri 10y ago
Enough has been said about incorrect gamma (this and [0]), now I think it's high time to bash the software of the world for incorrect downscaling (e.g. [1]). It has much more visible effects, and has real consequences for computer vision algorithms.
In the course on computer vision in my university (which I help teaching) we teach this stuff to make students understand physics, but at the end of the lecture I'd always note that for vision it's largely irrelevant and isn't worth the cycles to convert image to the linear scale.
[0] http://www.4p8.com/eric.brasseur/gamma.html http://www.4p8.com/eric.brasseur/gamma.html
[1] http://photo.stackexchange.com/questions/53820/why-do-photos-of-digital-screens-turn-out-the-way-they-do http://photo.stackexchange.com/questions/53820/why-do-photos...
- anotheryou 10y agough, yes. smart objects in photoshop downscale way uglier than pure pixel images (even when rasterizing the smart objects after the transform), no Idea why.
- joelkesler 10y agoThe resizing algorithm set in the photoshop preferences (bicubic, etc) is applied when resizing smart objects. I have found that if I am unhappy with how one algorithm looks, I switch to another, free transform the smart object (but make no sizing adjustment) and hit enter. The object will be rerendered with the newly selected algorithm.
- anotheryou 10y agoI found the settings, but somehow it's just still not the same. I now do the smart object stuff until it's all settled, than resize to 100%, rasterize and resize back to what I had set.
- goatface 10y agoThe development version of GIMP (the 2.9 series) - which will be come 2.10 uses GEGL which always does scaling with linear light encoding; as well as premultiplied alpha, regardless of what color "mode" the project is in. Getting scaling and resampling right in all cases is easier than retroactively fix the prevalent bad habit of non-linear compositing..
- ansgri 10y agoγ-correct scaling is good, but will GIMP support area-downscaling? I.e. if you downscale three times, you average each three (or 3×3 if both axes) pixels, not choose any one of them. Currently you get moire patterns, and "interpolation" is not a correct way to do downscale more than ½.
- goatface 10y agoIt already does, in git master GEGL/GIMP does averaging of pixels contributing in the area when scaling down. The previous development releases in the 2.9 series would only do proper downscaling for the nohalo and lohalo samplers. But since may of this year GEGL also does an area/averaging box filter for cubic and linear samplers.
- mark-r 10y agoPure averaging isn't the best way to go, that's basically a box filter. You can use the interpolation kernels, but you need to widen them proportionally to the amount you're downscaling. Instead of your bicubic working with a 4x4 area, for 3x downscaling it needs 12x12. Ideally for ½ scale you should be using 8x8 already.
- goatface 10y agoA box filter for scaling down cubic and linear is much better than using impulse filters with the interpolated values at the floating point coordinates in question. If someone wants to improve the code in GEGL (used for rotations, scaling, perspective transforms, live on image warping as well as other transforms in the development version of GIMP) the relevant place to put it in is here: https://git.gnome.org/browse/gegl/tree/gegl/buffer/gegl-sampler-linear.c#n76 https://git.gnome.org/browse/gegl/tree/gegl/buffer/gegl-samp... For the linear case a "tent-filter" instead of a box filter would be really correct, a similar box filter function exist in cubic. Both of these receive a reverse jacobian matrix indicating the shape and extent of surrounding area in source image to sample from.
- 10y ago