Skip to content
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

Speed up Lab conversion with Srgb/LinSrgb fast path, use palette FromStr impl #55

Merged
merged 1 commit into from
Aug 2, 2023

Commits on Aug 2, 2023

  1. 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.
    okaneco committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    a5f396a View commit details
    Browse the repository at this point in the history