-
-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1555 from Franz1960/max-chroma-binarization
New overloads for binary threshold operations. The new argument Color…
- Loading branch information
Showing
36 changed files
with
535 additions
and
72 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
26 changes: 26 additions & 0 deletions
26
src/ImageSharp/Processing/BinaryThresholdColorComponent.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
namespace SixLabors.ImageSharp.Processing | ||
{ | ||
/// <summary> | ||
/// The color component to be compared to threshold. | ||
/// </summary> | ||
public enum BinaryThresholdColorComponent : int | ||
{ | ||
/// <summary> | ||
/// Luminance color component according to ITU-R Recommendation BT.709. | ||
/// </summary> | ||
Luminance = 0, | ||
|
||
/// <summary> | ||
/// HSL saturation color component. | ||
/// </summary> | ||
Saturation = 1, | ||
|
||
/// <summary> | ||
/// Maximum of YCbCr chroma value, i.e. Cb and Cr distance from achromatic value. | ||
/// </summary> | ||
MaxChroma = 2, | ||
} | ||
} |
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
Oops, something went wrong.