Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color conversion with ICC profiles #1567
base: main
Are you sure you want to change the base?
Color conversion with ICC profiles #1567
Changes from 41 commits
16179b3
eeb40f5
8b96d37
aa2f1e9
3debb26
0812085
1094dc6
759f053
4cde4ef
a973713
33339d0
cdb495c
5f7acc1
7e2bc20
dc166a7
dcc8147
73c8d8f
d229fed
0a08da0
daf366b
54856ff
eee14c6
f60d4b8
8de137e
fb8003c
9f0f9cb
ece11eb
bd7257b
9a21485
ba76964
98d1758
66554cb
e90f165
8c580a7
a81dac9
902ed99
e3aa452
0dd68fe
6e3dc81
b7833a4
c3984aa
0fff06d
f1c05ee
3be31c3
6c2ee90
20e9b7f
d6fbc01
67ed4ce
b036cc3
52f88c8
ed47678
10bea86
5b131ad
ed8091b
6225db3
a65c599
60f3d9d
c940b86
a567613
3e06687
c1ebbfe
d89d8c5
63c89ca
3389d7a
7b0ff3b
29ed2b4
5f975e5
79f5dfa
b88b2a9
bca4cad
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gave this a quick look and haven't fully digested how it's supposed to work yet, but this
+ 0.5f
looks wrong. You'll be looking for a floor value to start and then finding the point after it to interpolate your fractional value.The line above seems to be doing that by alternately adding 0 and 1 to the position. The shift logic looks fishy but seems to work in my brain debugger. But as far as I can tell, you'll still need to clamp the values, because an input of 1 would lead to your 'low' point being the last vertex, so there is no 'high' value to be found at +1 from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the process was the same regardless of input. Identify the correct calculator, convert to a profile connection space, then from that to the target profile?
Are the inputs correct? I'm not 100% sure. There's a method in the calculator
CalculateIndexFactor
that generates theindexFactor
array. The number in the first position there is so high that the calculated value is over 1000 greater than the length of thelut
array. I can't find the equivalent in DemoIccMAX to that method.I'll have a look at those Little-CMS sources. Brian will be much more capable than I am reading them though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input values seem correct. I compared them to the values read in https://www.color.org/profileinspector.xalter The issue appears to be in the calculator itself.