-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up Lab conversion with Srgb/LinSrgb fast path
Srgb/LinSrgb conversion between u8 and f32/f64 has been special-cased to use a lookup table and approximation. This PR uses that implementation where possible. Speedup gains increase as image size increases. On a 4500x3000 image, a 44% speedup was seen reducing the time from 7.8s to 4.3s after switching from `into_format` to using `into_linear`. The speedup is closer to 15-17% on smaller images (320x200) but still noticeable when measured. Swap to using palette's FromStr implementation for colors. Now 3 or 6 digit hex colors are permitted.
- Loading branch information
Showing
5 changed files
with
24 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters