Enum graphicsmagick::types::CompositeOperator
source · #[repr(u32)]
pub enum CompositeOperator {
Show 49 variants
UndefinedCompositeOp,
OverCompositeOp,
InCompositeOp,
OutCompositeOp,
AtopCompositeOp,
XorCompositeOp,
PlusCompositeOp,
MinusCompositeOp,
AddCompositeOp,
SubtractCompositeOp,
DifferenceCompositeOp,
MultiplyCompositeOp,
BumpmapCompositeOp,
CopyCompositeOp,
CopyRedCompositeOp,
CopyGreenCompositeOp,
CopyBlueCompositeOp,
CopyOpacityCompositeOp,
ClearCompositeOp,
DissolveCompositeOp,
DisplaceCompositeOp,
ModulateCompositeOp,
ThresholdCompositeOp,
NoCompositeOp,
DarkenCompositeOp,
LightenCompositeOp,
HueCompositeOp,
SaturateCompositeOp,
ColorizeCompositeOp,
LuminizeCompositeOp,
ScreenCompositeOp,
OverlayCompositeOp,
CopyCyanCompositeOp,
CopyMagentaCompositeOp,
CopyYellowCompositeOp,
CopyBlackCompositeOp,
DivideCompositeOp,
HardLightCompositeOp,
ExclusionCompositeOp,
ColorDodgeCompositeOp,
ColorBurnCompositeOp,
SoftLightCompositeOp,
LinearBurnCompositeOp,
LinearDodgeCompositeOp,
LinearLightCompositeOp,
VividLightCompositeOp,
PinLightCompositeOp,
HardMixCompositeOp,
Unknown,
}
Expand description
CompositeOperator is used to select the image composition algorithm used to compose a composite image with an image. By default, each of the composite image pixels are replaced by the corresponding image tile pixel. Specify CompositeOperator to select a different algorithm.
The image compositor requires a matte, or alpha channel in the image for some operations. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. For certain operations, if image does not have a matte channel, it is initialized with 0 for any pixel matching in color to pixel location (0,0), otherwise 255 (to work properly borderWidth must be 0).
http://www.graphicsmagick.org/api/types.html#compositeoperator
Variants§
UndefinedCompositeOp
Unset value.
OverCompositeOp
The result is the union of the the two image shapes with the composite image obscuring image in the region of overlap.
InCompositeOp
The result is a simply composite image cut by the shape of image. None of the image data of image is included in the result.
OutCompositeOp
The resulting image is composite image with the shape of image cut out.
AtopCompositeOp
The result is the same shape as image image, with composite image obscuring image there the image shapes overlap. Note that this differs from OverCompositeOp because the portion of composite image outside of image’s shape does not appear in the result.
XorCompositeOp
The result is the image data from both composite image and image that is outside the overlap region. The overlap region will be blank.
PlusCompositeOp
The result is just the sum of the image data. Output values are cropped to 255 (no over=low). This operation is independent of the matte channels.
MinusCompositeOp
The result of composite image - image, with overflow cropped to zero. The matte chanel is ignored (set to 255, full coverage).
AddCompositeOp
The result of composite image + image, with overflow wrapping around (mod 256).
SubtractCompositeOp
The result of composite image - image, with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reversible transformations.
DifferenceCompositeOp
The result of abs(composite image - image). This is useful for comparing two very similar images.
MultiplyCompositeOp
BumpmapCompositeOp
The result image shaded by composite image.
CopyCompositeOp
The resulting image is image replaced with composite image. Here the matte information is ignored.
CopyRedCompositeOp
The resulting image is the red layer in image replaced with the red layer in composite image. The other layers are copied untouched.
CopyGreenCompositeOp
The resulting image is the green layer in image replaced with the green layer in composite image. The other layers are copied untouched.
CopyBlueCompositeOp
The resulting image is the blue layer in image replaced with the blue layer in composite image. The other layers are copied untouched.
CopyOpacityCompositeOp
The resulting image is the matte layer in image replaced with the matte layer in composite image. The other layers are copied untouched.
ClearCompositeOp
Pixels in the region are set to Transparent.
DissolveCompositeOp
DisplaceCompositeOp
ModulateCompositeOp
Modulate brightness in HSL space.
ThresholdCompositeOp
NoCompositeOp
Do nothing at all.
DarkenCompositeOp
LightenCompositeOp
HueCompositeOp
Copy Hue channel (from HSL colorspace).
SaturateCompositeOp
Copy Saturation channel (from HSL colorspace).
ColorizeCompositeOp
Copy Hue and Saturation channels (from HSL colorspace).
LuminizeCompositeOp
Copy Brightness channel (from HSL colorspace).
ScreenCompositeOp
[Not yet implemented]
OverlayCompositeOp
[Not yet implemented]
CopyCyanCompositeOp
Copy the Cyan channel.
CopyMagentaCompositeOp
Copy the Magenta channel.
CopyYellowCompositeOp
Copy the Yellow channel.
CopyBlackCompositeOp
Copy the Black channel.
DivideCompositeOp
HardLightCompositeOp
ExclusionCompositeOp
ColorDodgeCompositeOp
ColorBurnCompositeOp
SoftLightCompositeOp
LinearBurnCompositeOp
LinearDodgeCompositeOp
LinearLightCompositeOp
VividLightCompositeOp
PinLightCompositeOp
HardMixCompositeOp
Unknown
Trait Implementations§
source§impl Clone for CompositeOperator
impl Clone for CompositeOperator
source§fn clone(&self) -> CompositeOperator
fn clone(&self) -> CompositeOperator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CompositeOperator
impl Debug for CompositeOperator
source§impl From<CompositeOperator> for u32
impl From<CompositeOperator> for u32
source§fn from(enum_value: CompositeOperator) -> Self
fn from(enum_value: CompositeOperator) -> Self
source§impl From<u32> for CompositeOperator
impl From<u32> for CompositeOperator
source§impl FromPrimitive for CompositeOperator
impl FromPrimitive for CompositeOperator
source§impl PartialEq<CompositeOperator> for CompositeOperator
impl PartialEq<CompositeOperator> for CompositeOperator
source§fn eq(&self, other: &CompositeOperator) -> bool
fn eq(&self, other: &CompositeOperator) -> bool
self
and other
values to be equal, and is used
by ==
.