Enum PixelMath
- Namespace
- Egami.Operations
- Assembly
- Egami.dll
An arithmetic operation with a constant, for Arithmetic(PixelMath, float, ColorChannels): ImageMagick's -evaluate operators.
public enum PixelMath
Fields
Add = 0v + value.
Divide = 3v / value; dividing by 0 divides by the smallest positive number instead.
Log = 5log(value · v + 1) / log(value + 1): brightens shadows, more strongly as value grows.
Max = 7The larger of v and value.
Min = 6The smaller of v and value.
Multiply = 2v · value.
Pow = 4v raised to the power value.
Set = 8value, whatever v is.
Subtract = 1v − value.
Examples
// Lift the shadows with a log curve, then cap the highlights; values are on a 0 to 1 scale, as ImageMagick's -evaluate.
photo.Apply(ops => ops
.Arithmetic(PixelMath.Log, 3)
.Arithmetic(PixelMath.Min, 0.95f), Ct);