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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
cyan | int | The cyan component. Valid values are 0 through 255. |
magenta | int | The magenta component. Valid values are 0 through 255. |
yellow | int | The yellow component. Valid values are 0 through 255. |
black | int | The 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:
Parameter | Type | Description |
---|---|---|
cmyk | int | The 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:
Parameter | Type | Description |
---|---|---|
cmyk | int | The 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:
Parameter | Type | Description |
---|---|---|
cmyk | int | The 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:
Parameter | Type | Description |
---|---|---|
cmyk | int | The 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:
Parameter | Type | Description |
---|---|---|
cmykPixel | int | The 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:
Parameter | Type | Description |
---|---|---|
cmykPixels | int[] | 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:
Parameter | Type | Description |
---|---|---|
cmykPixels | int[] | 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:
Parameter | Type | Description |
---|---|---|
cmykPixel | int | The 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:
Parameter | Type | Description |
---|---|---|
cmykPixel | int | The CMYK color presented as a 32-bit integer value. |
cmykIccStream | java.io.InputStream | The stream containing CMYK Icc profile. |
rgbIccStream | java.io.InputStream | The 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:
Parameter | Type | Description |
---|---|---|
cmykPixels | int[] | 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:
Parameter | Type | Description |
---|---|---|
cmykPixels | int[] | The CMYK colors presented as 32-bit integer values. |
cmykIccStream | java.io.InputStream | The stream containing CMYK Icc profile. |
rgbIccStream | java.io.InputStream | The 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:
Parameter | Type | Description |
---|---|---|
pixel | Color | The 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:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | 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:
Parameter | Type | Description |
---|---|---|
argbPixel | int | The 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:
Parameter | Type | Description |
---|---|---|
argbPixels | int[] | 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:
Parameter | Type | Description |
---|---|---|
argbPixels | int[] | The RGB colors presented as 32-bit integer values. |
startIndex | int | The start index of RGB color. |
length | int | The 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:
Parameter | Type | Description |
---|---|---|
pixel | Color | The 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:
Parameter | Type | Description |
---|---|---|
pixel | Color | The ARGB color. |
rgbIccStream | java.io.InputStream | The stream containing RGB Icc profile. |
cmykIccStream | java.io.InputStream | The 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:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | 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:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The ARGB colors. |
rgbIccStream | java.io.InputStream | The stream containing RGB Icc profile. |
cmykIccStream | java.io.InputStream | The 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:
Parameter | Type | Description |
---|---|---|
pixels | int[] | The RGB colors presented as 32-bit integer values. |
startIndex | int | The start index of RGB color. |
length | int | The number of RGB pixels to convert. |
rgbIccStream | java.io.InputStream | The RGB profile stream. |
cmykIccStream | java.io.InputStream | The 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:
Parameter | Type | Description |
---|---|---|
pixels | int[] | |
startIndex | int | |
length | int | |
rgbIccStream | com.aspose.ms.System.IO.Stream | |
cmykIccStream | com.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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |