Skip to content

Fix huerotate clamping to support subpixel types other than u8, f32, and f64 - #2860

Open
RunDevelopment wants to merge 3 commits into
image-rs:mainfrom
RunDevelopment:huerotate-fix-for-all-but-u8
Open

RunDevelopment wants to merge 3 commits into
image-rs:mainfrom
RunDevelopment:huerotate-fix-for-all-but-u8

Conversation

@RunDevelopment

Copy link
Copy Markdown
Member

The clamping done by huerotate and huerotate_in_place assumed u8 and was incorrect for all primitives except u8, f32, and f64.


Unrelated, it is really wasteful to do all calculations in f64 for subpixel types like u8 and u16.

@mstoeckl mstoeckl left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable. (As much as I'd wish for "huerotate" to be removed entirely in favor of better color space handling + chroma adjustment functions, because it's already present just fixing the issues will probably minimize user surprise and upgrade work.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants