5 comments

  • shaggie7610 minutes ago
    ICC profiles present a similar problem and remarkably Instagram, ostensibly a photo-sharing web-site, does not respect them when scaling images (or at least it didn't a few years ago when I started posting photos to it from my PC); when I uploaded full-resolution SLR-resolution originals the skin-tones would get all screwed up. If I exported at the final resolution, even with the same ICC profile, they were fine.
  • zokier1 hour ago
    for lot of image processing linearizing srgb is only half-way measure, and you might want to reach for a better colorspace altogether. cielab is obvious example, or maybe oklab/jzazbz/xyb/something else.
    • raphlinus1 hour ago
      Exactly this, there&#x27;s rarely a single &quot;correct&quot; colorspace, you make a choice based on expressive goals and constraints. For example, for gradients you almost never want linear, something like Oklab is indeed much better.<p>The gradient examples between high-chroma colors of similar luminance are highly misleading in my opinion. In that particular case, linear just happens to do well (and device RGB of course poorly), but in other cases linear is not great. For example, blue to white is especially bad, with hue shifts as well as lightness non-uniformity.<p>You can experiment with this in the interactive tester in my Oklab review[1].<p>[1]: <a href="https:&#x2F;&#x2F;raphlinus.github.io&#x2F;color&#x2F;2021&#x2F;01&#x2F;18&#x2F;oklab-critique.html" rel="nofollow">https:&#x2F;&#x2F;raphlinus.github.io&#x2F;color&#x2F;2021&#x2F;01&#x2F;18&#x2F;oklab-critique....</a>
  • nicebyte20 minutes ago
    there isn&#x27;t much that is &quot;arcane&quot; about gamma correction itself (as in, the math itself is really simple).<p>at the fundamental level, if a surface is illuminated with one lightbulb and we add another light bulb, the difference is exteremely noticeable to the human eye. if we add one more lightbulb to a surface that is already illuminated by a hundred light bulbs, there will be no perceptible difference. the exact response can be modeled with a pretty simple power law (with a modification in the low range, as the article mentions).<p>that&#x27;s all there really is to &quot;gamma correction&quot;. it&#x27;s a hack that exploits this quirk of the human visual system in order to more efficiently allocate bits for encoding different &quot;lightness&quot; values.<p>all of the confusion and bugs stem from one or more of the systems in the chain that forms the final image, making an incorrect assumption about what the others are doing. it&#x27;s a bit like coordinate spaces in that regard.
    • nicebyte17 minutes ago
      general rule of thumb is that you never want gamma-corrected values if you intend to be doing any sort of math with them. the only exception is when you want to match the behavior of softwares that actually do all the math with pixel values in sRGB space (I think that&#x27;s what photoshop does but don&#x27;t quote me on that).
  • dheera1 hour ago
    &gt; On which image does the gradation appear more even? It’s the second one!<p>I felt the first one looked more even. On the first I could tell the difference between every two adjacent bars. On the second one I couldn&#x27;t tell any difference between the first 4-5 bars.
    • tobr6 minutes ago
      Probably because it’s displayed on a white background. A gray or black background would have shown the difference more clearly.
  • LoganDark2 hours ago
    &gt; Pixels with RGB values of (128, 128, 128) emit about half as much light as pixels with RGB values of (255, 255, 255).<p>Technically, this is not always incorrect, if your working color space is linear and 0 is no light. The problem only comes if you hand that same data to routines or surfaces expecting sRGB or another nonlinear color space (or one where 0 is not no light).
    • nomel2 hours ago
      &gt; or one where 0 is not no light<p>Oh, interesting. What&#x27;s an example of this? Some sort of log space?
      • Someone1 hour ago
        I would think the color spaces of most displays have that, don’t they?<p>The bevel of a black iPhone is darker than its screen, even when powered off. Similarly, switched off CRT displays aren’t truly black.
      • LoganDark2 hours ago
        Oh, I was just listing the constraints. I&#x27;m not directly aware of a color space where value 0 is not no light. It would however mean that even if linear, doubling a value relative to 0 wouldn&#x27;t necessarily double the amount of light.
      • pavlov2 hours ago
        Most video color spaces have black at a non-zero code value.<p>The most common 8-bit YUV format (e.g. in MPEG-2) uses a 16-235 range for valid luma values, so black is at 16 and white is at 235.<p>The reason for leaving this “headroom” and “footroom” had to do both with digitizing analog signals and avoiding clipping during processing.