Cmyk64 Struct

An opaque pixel with 16-bit cyan, magenta, yellow and black ink amounts, stored in native endianness.

public struct Cmyk64 : IEquatable<Cmyk64>

Remarks

Each component is the amount of an ink: 0 is no ink and 65535 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
Cmyk64(ushort, ushort, ushort, ushort)Initializes a new instance of the Cmyk64 struct.

Cmyk64(ushort, ushort, ushort, ushort)

Cmyk64.cs

Initializes a new instance of the Cmyk64 struct.

public Cmyk64(ushort c, ushort m, ushort y, ushort k)

Parameters

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

Methods

NameDescription
Equals(Cmyk64)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(Cmyk64)

Cmyk64.cs

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

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

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

Equals(object?)

Cmyk64.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()

Cmyk64.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()

Cmyk64.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 ==(Cmyk64, Cmyk64)Compares two pixels for equality.
operator !=(Cmyk64, Cmyk64)Compares two pixels for inequality.

operator ==(Cmyk64, Cmyk64)

Cmyk64.cs

Compares two pixels for equality.

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

Parameters

left Cmyk64
The first pixel.
right Cmyk64
The second pixel.

Returns

bool true if all components are equal; otherwise false.

operator !=(Cmyk64, Cmyk64)

Cmyk64.cs

Compares two pixels for inequality.

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

Parameters

left Cmyk64
The first pixel.
right Cmyk64
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 ushort C

K

The black ink.

public ushort K

M

The magenta ink.

public ushort M

Y

The yellow ink.

public ushort Y