Issue #84: do not process color conversion twice.
authorJehan <jehan@girinstud.io>
Sun, 12 Feb 2023 11:58:19 +0000 (12:58 +0100)
committerJehan <jehan@girinstud.io>
Sun, 12 Feb 2023 12:25:40 +0000 (13:25 +0100)
commitfa4a75408735eb18da8a9a8c9a6e91216d96afe2
tree0df7acfbe9e754e9afac958e662d791c4447d8ac
parent28c3992fa5eaeb3ab2eb8f20548bd20213e4f6e0
Issue #84: do not process color conversion twice.

Until now babl_fish_lut_process_maybe() was always returning 0, even
when a LUT existed, hence a LUT-based conversion happened.

This was bad, first because it was inefficient (the point of the LUT is
that we didn't have to process through usual conversion code paths). But
worse: when the source and destination buffers were the same, we would
end up getting wrong result (since we'd have the source converted
in-place, then re-converted, hence double conversion!).

This was the reason for issue #84 (see screenshot showing very wrong
colors because of double conversion).
babl/babl-fish-path.c