Closed GoogleCodeExporter closed 9 years ago
It's not clear that this was ever correct, but something recent seems to have
made it vastly worse (probably something outside of the above mentioned
functions)
Original comment by fintic...@gmail.com
on 11 Jun 2013 at 12:41
I take that back: the attached patch to color_rgb_get_linear,
color_linear_get_rgb,
implementing the companding recommended by Bruce Lindbloom,
http://www.brucelindbloom.com/Eqn_RGB_to_XYZ.html +
http://www.brucelindbloom.com/Eqn_XYZ_to_RGB.html, seems to have fixed the
excessive darkness. These equations were already in use for the existing RGB
<-> XYZ transforms, but for some reason (speed?) were not used in the linear
<-> nonlinear RGB transform functions).
Not pushing this patch yet because I'm sure there was a reason for the use of
unconventional and asymmetric coefficients in the previous RGB de/linearization
code, and hope to find out what those reasons were.
Original comment by fintic...@gmail.com
on 11 Jun 2013 at 1:41
Attachments:
The original de/linearization functions are a total fail. Worst of all things,
is that the linearization code is in color_linear_get_rgb, and delinearization
code is in color_rgb_get_linear.
I do not think there was any reason to do anything differently, and not use a
proper sRGB to linear conversion.
Original comment by thezbyg
on 11 Jun 2013 at 3:50
Okay, then I'll reverse the meaning of those two functions so
color_rgb_get_linear returns linearized results and color_linear_get_rgb
returns delinearized, adjust references appropriately, and push.
Original comment by fintic...@gmail.com
on 12 Jun 2013 at 1:43
Never mind the 'reverse the meaning'. It seems that they are currently (with my
patch) already correct and the code using them is already correct too. I'll
just check everything and push the patch as-is.
Original comment by fintic...@gmail.com
on 12 Jun 2013 at 2:18
This issue was closed by revision 9664b3ff15f6.
Original comment by 00a...@gmail.com
on 12 Jun 2013 at 2:30
BTW, I've noticed that for some reason I'm obligated to do 'merge commits'
every time I 'hg pull;hg update' from Google code and there are actual changes
transferred. I'd like to avoid clogging up the commit log with these things but
'hg push' doesn't seem to work without first 'hg merge'ing, despite the fact
that the merge commits report 'no changes'.
Currently trying to fix this, any suggestions will be gratefully received.
Original comment by fintic...@gmail.com
on 12 Jun 2013 at 2:38
Before doing 'hg push' to Google Code repository, you can run 'hg pull
--rebase', or 'hg rebase' if you already have pulled some remote changes while
having local commits. This will move your local commits after the most recent
remote commit.
The '--rebase' flag and 'hg rebase' command requires 'rebase' extension. which
is included with default Mercurial distribution, but must be enabled by editing
your '.hgrc' file.
More information about 'rebase' extension:
http://mercurial.selenic.com/wiki/RebaseExtension
Original comment by thezbyg
on 12 Jun 2013 at 9:06
Original issue reported on code.google.com by
fintic...@gmail.com
on 10 Jun 2013 at 3:27