-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add spot colour channel rendering #48
Conversation
e297c30
to
5c22c28
Compare
crates/jxl-oxide/src/lib.rs
Outdated
@@ -135,6 +135,7 @@ impl<R: Read> JxlImage<R> { | |||
image_header: &self.image_header, | |||
embedded_icc: self.embedded_icc.as_deref(), | |||
ctx, | |||
render_spot_colour: true, |
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.
We might need to prevent rendering spot color channels if the image is grayscale.
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.
Сan we use red
color from spot channel as luma and just ignore green
and blue
as it is now with grayscale images?
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'm not sure about the semantics of spot color channels on grayscale images; bitstream does not forbid this, but tricolor spot color channel doesn't make sense with grayscale ICC profile. Let's go with emitting a warning for this time.
66cd781
to
1f2c883
Compare
1f2c883
to
fe614fa
Compare
fe614fa
to
1a0e535
Compare
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.
Great work, thanks!
Adds rendering of spot color channels by default, a
set_render_spot_colour
method to enable/disable their rendering and arender_spot_colour
method to get the value of that flag inJxlRenderer
Rendering of spot channels onto color channels is disabled during conformance testing since they are tested as separate channels
fixes #15