CmykColorHelper

Inheritance: java.lang.Object

public final class CmykColorHelper

Helper methods to work with CMYK color presented as a signed 32-bit integer value. Provides the similar API as the com.aspose.psd.CmykColor struct. It’s more lightweight because CMYK color is presented just as Int32 rather than structure with internal fields. Please prefer to use static methods of this class when possible instead of the deprecated com.aspose.psd.CmykColor struct.

Methods

MethodDescription
equals(Object arg0)
fromComponents(int cyan, int magenta, int yellow, int black)Creates CMYK from a 32-bit cyan, magenta, yellow and black values.
getC(int cmyk)Gets the cyan component value.
getClass()
getK(int cmyk)Gets the black component value.
getM(int cmyk)Gets the magenta component value.
getY(int cmyk)Gets the yellow component value.
hashCode()
notify()
notifyAll()
toArgb(int cmykPixel)The conversion from CMYK color to ARGB color.
toArgb(int[] cmykPixels)The conversion from CMYK colors to ARGB colors.
toArgb32(int[] cmykPixels)The conversion from CMYK colors to ARGB colors.
toArgbIcc(int cmykPixel)The conversion from CMYK color to ARGB Color using Icc conversion with default profiles.
toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)The conversion from CMYK color to ARGB color using Icc conversion with custom profile.
toArgbIcc(int[] cmykPixels)The conversion from CMYK colors to ARGB colors using Icc conversion with default profiles.
toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)The conversion from CMYK colors to ARGB colors using Icc conversion with custom profiles.
toCmyk(Color pixel)The conversion from ARGB color to CMYK color.
toCmyk(Color[] pixels)The conversion from ARGB colors to CMYK colors.
toCmyk(int argbPixel)The conversion from ARGB color to CMYK color.
toCmyk(int[] argbPixels)The conversion from ARGB colors to CMYK colors.
toCmykBytes(int[] argbPixels, int startIndex, int length)Converts RGB to CMYK.
toCmykIcc(Color pixel)The conversion from ARGB color to CMYK color using Icc conversion with default profiles.
toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)The conversion from ARGB color to CMYK color using Icc conversion with custom profiles.
toCmykIcc(Color[] pixels)The conversion from ARGB colors to CMYK colors using Icc conversion with default profiles.
toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)The conversion from ARGB colors to CMYK colors using Icc conversion with custom profiles.
toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)Converts RGB to CMYK using custom ICC profiles.
toCmykIccBytes_internalized(int[] pixels, int startIndex, int length, System.IO.Stream rgbIccStream, System.IO.Stream cmykIccStream)
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fromComponents(int cyan, int magenta, int yellow, int black)

public static int fromComponents(int cyan, int magenta, int yellow, int black)

Creates CMYK from a 32-bit cyan, magenta, yellow and black values.

Parameters:

ParameterTypeDescription
cyanintThe cyan component. Valid values are 0 through 255.
magentaintThe magenta component. Valid values are 0 through 255.
yellowintThe yellow component. Valid values are 0 through 255.
blackintThe black component. Valid values are 0 through 255.

Returns: int - The CMYK color presented as a 32-bit integer value.

getC(int cmyk)

public static int getC(int cmyk)

Gets the cyan component value.

Parameters:

ParameterTypeDescription
cmykintThe CMYK color presented as a 32-bit integer value.

Returns: int - The cyan component value.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getK(int cmyk)

public static int getK(int cmyk)

Gets the black component value.

Parameters:

ParameterTypeDescription
cmykintThe CMYK color presented as a 32-bit integer value.

Returns: int - The black component value.

getM(int cmyk)

public static int getM(int cmyk)

Gets the magenta component value.

Parameters:

ParameterTypeDescription
cmykintThe CMYK color presented as a 32-bit integer value.

Returns: int - The magenta component value.

getY(int cmyk)

public static int getY(int cmyk)

Gets the yellow component value.

Parameters:

ParameterTypeDescription
cmykintThe CMYK color presented as a 32-bit integer value.

Returns: int - The yellow component value.

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toArgb(int cmykPixel)

public static Color toArgb(int cmykPixel)

The conversion from CMYK color to ARGB color.

Parameters:

ParameterTypeDescription
cmykPixelintThe CMYK color presented as a 32-bit integer value.

Returns: Color - The ARGB color.

toArgb(int[] cmykPixels)

public static Color[] toArgb(int[] cmykPixels)

The conversion from CMYK colors to ARGB colors.

Parameters:

ParameterTypeDescription
cmykPixelsint[]The CMYK colors presented as 32-bit integer values.

Returns: com.aspose.psd.Color[] - The ARGB colors.

toArgb32(int[] cmykPixels)

public static int[] toArgb32(int[] cmykPixels)

The conversion from CMYK colors to ARGB colors.

Parameters:

ParameterTypeDescription
cmykPixelsint[]The CMYK colors presented as 32-bit integer values.

Returns: int[] - The ARGB colors presented as 32-bit integer values.

toArgbIcc(int cmykPixel)

public static Color toArgbIcc(int cmykPixel)

The conversion from CMYK color to ARGB Color using Icc conversion with default profiles.

Parameters:

ParameterTypeDescription
cmykPixelintThe CMYK color presented as a 32-bit integer value.

Returns: Color - The ARGB color.

toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)

public static Color toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)

The conversion from CMYK color to ARGB color using Icc conversion with custom profile.

Parameters:

ParameterTypeDescription
cmykPixelintThe CMYK color presented as a 32-bit integer value.
cmykIccStreamjava.io.InputStreamThe stream containing CMYK Icc profile.
rgbIccStreamjava.io.InputStreamThe stream containing RGB Icc profile.

Returns: Color - The ARGB color.

toArgbIcc(int[] cmykPixels)

public static Color[] toArgbIcc(int[] cmykPixels)

The conversion from CMYK colors to ARGB colors using Icc conversion with default profiles.

Parameters:

ParameterTypeDescription
cmykPixelsint[]The CMYK pixels presented as 32-bit integer values.

Returns: com.aspose.psd.Color[] - The ARGB colors.

toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)

public static Color[] toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)

The conversion from CMYK colors to ARGB colors using Icc conversion with custom profiles.

Parameters:

ParameterTypeDescription
cmykPixelsint[]The CMYK colors presented as 32-bit integer values.
cmykIccStreamjava.io.InputStreamThe stream containing CMYK Icc profile.
rgbIccStreamjava.io.InputStreamThe stream containing RGB Icc profile.

Returns: com.aspose.psd.Color[] - The ARGB colors.

toCmyk(Color pixel)

public static int toCmyk(Color pixel)

The conversion from ARGB color to CMYK color.

Parameters:

ParameterTypeDescription
pixelColorThe ARGB color.

Returns: int - The CMYK color presented as a 32-bit integer value.

toCmyk(Color[] pixels)

public static int[] toCmyk(Color[] pixels)

The conversion from ARGB colors to CMYK colors.

Parameters:

ParameterTypeDescription
pixelsColor[]The ARGB colors.

Returns: int[] - The CMYK colors presented as 32-bit integer values.

toCmyk(int argbPixel)

public static int toCmyk(int argbPixel)

The conversion from ARGB color to CMYK color.

Parameters:

ParameterTypeDescription
argbPixelintThe ARGB color presented as a 32-bit integer value.

Returns: int - The CMYK color presented as a 32-bit integer value.

toCmyk(int[] argbPixels)

public static int[] toCmyk(int[] argbPixels)

The conversion from ARGB colors to CMYK colors.

Parameters:

ParameterTypeDescription
argbPixelsint[]The ARGB colors presented as 32-bit integer values.

Returns: int[] - The CMYK colors presented as 32-bit integer values.

toCmykBytes(int[] argbPixels, int startIndex, int length)

public static byte[] toCmykBytes(int[] argbPixels, int startIndex, int length)

Converts RGB to CMYK.

Parameters:

ParameterTypeDescription
argbPixelsint[]The RGB colors presented as 32-bit integer values.
startIndexintThe start index of RGB color.
lengthintThe number of RGB pixels to convert.

Returns: byte[] - The CMYK colors presented as a byte array.

toCmykIcc(Color pixel)

public static int toCmykIcc(Color pixel)

The conversion from ARGB color to CMYK color using Icc conversion with default profiles.

Parameters:

ParameterTypeDescription
pixelColorThe ARGB color.

Returns: int - The CMYK color presented as a 32-bit integer value.

toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

public static int toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

The conversion from ARGB color to CMYK color using Icc conversion with custom profiles.

Parameters:

ParameterTypeDescription
pixelColorThe ARGB color.
rgbIccStreamjava.io.InputStreamThe stream containing RGB Icc profile.
cmykIccStreamjava.io.InputStreamThe stream containing CMYK Icc profile.

Returns: int - The CMYK color presented as a 32-bit integer value.

toCmykIcc(Color[] pixels)

public static int[] toCmykIcc(Color[] pixels)

The conversion from ARGB colors to CMYK colors using Icc conversion with default profiles.

Parameters:

ParameterTypeDescription
pixelsColor[]The ARGB colors.

Returns: int[] - The CMYK colors presented as 32-bit integer values.

toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

public static int[] toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

The conversion from ARGB colors to CMYK colors using Icc conversion with custom profiles.

Parameters:

ParameterTypeDescription
pixelsColor[]The ARGB colors.
rgbIccStreamjava.io.InputStreamThe stream containing RGB Icc profile.
cmykIccStreamjava.io.InputStreamThe stream containing CMYK Icc profile.

Returns: int[] - The CMYK colors presented as 32-bit integer values.

toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

public static byte[] toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)

Converts RGB to CMYK using custom ICC profiles.

Parameters:

ParameterTypeDescription
pixelsint[]The RGB colors presented as 32-bit integer values.
startIndexintThe start index of RGB color.
lengthintThe number of RGB pixels to convert.
rgbIccStreamjava.io.InputStreamThe RGB profile stream.
cmykIccStreamjava.io.InputStreamThe CMYK profile stream.

Returns: byte[] - The CMYK colors presented as a byte array.

toCmykIccBytes_internalized(int[] pixels, int startIndex, int length, System.IO.Stream rgbIccStream, System.IO.Stream cmykIccStream)

public static byte[] toCmykIccBytes_internalized(int[] pixels, int startIndex, int length, System.IO.Stream rgbIccStream, System.IO.Stream cmykIccStream)

Parameters:

ParameterTypeDescription
pixelsint[]
startIndexint
lengthint
rgbIccStreamcom.aspose.ms.System.IO.Stream
cmykIccStreamcom.aspose.ms.System.IO.Stream

Returns: byte[]

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int