Cmyk32 Struct

An opaque pixel with 8-bit cyan, magenta, yellow and black ink amounts.

public struct Cmyk32 : IEquatable<Cmyk32>

Remarks

Each component is the amount of an ink: 0 is no ink and 255 is full coverage (paper white is (0, 0, 0, 0)). Files that store the complement (Adobe CMYK JPEG files) are complemented when they are read and written.

The colors of the inks depend on the printing condition, described by the CMYK ICC profile of the image (ImageMetadata.IccProfile). Converting CMYK pixels to another pixel format converts their colors, which needs PixelConversionOptions.CmykConversion.

Implements

Constructors

NameDescription
Cmyk32(byte, byte, byte, byte)Initializes a new instance of the Cmyk32 struct.

Cmyk32(byte, byte, byte, byte)

Cmyk32.cs

Initializes a new instance of the Cmyk32 struct.

public Cmyk32(byte c, byte m, byte y, byte k)

Parameters

c byte
The cyan ink.
m byte
The magenta ink.
y byte
The yellow ink.
k byte
The black ink.

Methods

NameDescription
Equals(Cmyk32)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(Cmyk32)

Cmyk32.cs

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(Cmyk32 other)
Parameters
other Cmyk32
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Cmyk32.cs

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Cmyk32.cs

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

ToString()

Cmyk32.cs

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string The fully qualified type name.

Operators

NameDescription
operator ==(Cmyk32, Cmyk32)Compares two pixels for equality.
operator !=(Cmyk32, Cmyk32)Compares two pixels for inequality.

operator ==(Cmyk32, Cmyk32)

Cmyk32.cs

Compares two pixels for equality.

public static bool operator ==(Cmyk32 left, Cmyk32 right)

Parameters

left Cmyk32
The first pixel.
right Cmyk32
The second pixel.

Returns

bool true if all components are equal; otherwise false.

operator !=(Cmyk32, Cmyk32)

Cmyk32.cs

Compares two pixels for inequality.

public static bool operator !=(Cmyk32 left, Cmyk32 right)

Parameters

left Cmyk32
The first pixel.
right Cmyk32
The second pixel.

Returns

bool true if any component differs; otherwise false.

Fields

NameDescription
CThe cyan ink.
KThe black ink.
MThe magenta ink.
YThe yellow ink.

C

The cyan ink.

public byte C

K

The black ink.

public byte K

M

The magenta ink.

public byte M

Y

The yellow ink.

public byte Y