forked from image-rs/image
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use enlargeable types in to_luma functions.
This is an attempt to fix image-rs#1214, using the `Enlargeable` trait to select a suitable type for the calculation in `rgb_to_luma` and `bgr_to_luma`. Integer pixel types will use suitable integer pixel types for the calculation, while floating point pixel types will use floating point types. This PR also provides the `Enlargeable` trait for all `Primitive` types (luckily, `Primitive` is not implemented for 128 bit numeric types).
- Loading branch information
Showing
2 changed files
with
47 additions
and
13 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