public final class CmykColorHelper extends Object
Helper methods to work with CMYK color presented as a signed 32-bit integer value.
Provides the similar API as the com.aspose.imaging.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.imaging.CmykColor
struct.
Modifier and Type | Method and Description |
---|---|
static int |
fromComponents(int cyan,
int magenta,
int yellow,
int black)
Creates CMYK from a 32-bit cyan, magenta, yellow and black values.
|
static int |
getC(int cmyk)
Gets the cyan component value.
|
static int |
getK(int cmyk)
Gets the black component value.
|
static int |
getM(int cmyk)
Gets the magenta component value.
|
static int |
getY(int cmyk)
Gets the yellow component value.
|
static Color |
toArgb(int cmykPixel)
The conversion from CMYK color to ARGB color.
|
static Color[] |
toArgb(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors.
|
static int[] |
toArgb32(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors.
|
static Color |
toArgbIcc(int cmykPixel)
The conversion from CMYK color to ARGB Color using Icc conversion with default profiles.
|
static Color[] |
toArgbIcc(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors using Icc conversion with default profiles.
|
static Color[] |
toArgbIcc(int[] cmykPixels,
InputStream cmykIccStream,
InputStream rgbIccStream)
The conversion from CMYK colors to ARGB colors using Icc conversion with custom profiles.
|
static Color |
toArgbIcc(int cmykPixel,
InputStream cmykIccStream,
InputStream rgbIccStream)
The conversion from CMYK color to ARGB color using Icc conversion with custom profile.
|
static int |
toCmyk(Color pixel)
The conversion from ARGB color to CMYK color.
|
static int[] |
toCmyk(Color[] pixels)
The conversion from ARGB colors to CMYK colors.
|
static int |
toCmyk(int argbPixel)
The conversion from ARGB color to CMYK color.
|
static int[] |
toCmyk(int[] argbPixels)
The conversion from ARGB colors to CMYK colors.
|
static byte[] |
toCmykBytes(int[] argbPixels,
int startIndex,
int length)
Converts RGB to CMYK.
|
static int |
toCmykIcc(Color pixel)
The conversion from ARGB color to CMYK color using Icc conversion with default profiles.
|
static int[] |
toCmykIcc(Color[] pixels)
The conversion from ARGB colors to CMYK colors using Icc conversion with default profiles.
|
static int[] |
toCmykIcc(Color[] pixels,
InputStream rgbIccStream,
InputStream cmykIccStream)
The conversion from ARGB colors to CMYK colors using Icc conversion with custom profiles.
|
static int |
toCmykIcc(Color pixel,
InputStream rgbIccStream,
InputStream cmykIccStream)
The conversion from ARGB color to CMYK color using Icc conversion with custom profiles.
|
static byte[] |
toCmykIccBytes(int[] pixels,
int startIndex,
int length,
InputStream rgbIccStream,
InputStream cmykIccStream)
Converts RGB to CMYK using custom ICC profiles.
|
public static int getC(int cmyk)
Gets the cyan component value.
cmyk
- The CMYK color presented as a 32-bit integer value.public static int getM(int cmyk)
Gets the magenta component value.
cmyk
- The CMYK color presented as a 32-bit integer value.public static int getY(int cmyk)
Gets the yellow component value.
cmyk
- The CMYK color presented as a 32-bit integer value.public static int getK(int cmyk)
Gets the black component value.
cmyk
- The CMYK color presented as a 32-bit integer value.public static int fromComponents(int cyan, int magenta, int yellow, int black)
Creates CMYK from a 32-bit cyan, magenta, yellow and black values.
cyan
- The cyan component. Valid values are 0 through 255.magenta
- The magenta component. Valid values are 0 through 255.yellow
- The yellow component. Valid values are 0 through 255.black
- The black component. Valid values are 0 through 255.public static int[] toCmyk(int[] argbPixels)
The conversion from ARGB colors to CMYK colors.
argbPixels
- The ARGB colors presented as 32-bit integer values.public static byte[] toCmykBytes(int[] argbPixels, int startIndex, int length)
Converts RGB to CMYK.
argbPixels
- The RGB colors presented as 32-bit integer values.startIndex
- The start index of RGB color.length
- The number of RGB pixels to convert.public static int toCmyk(int argbPixel)
The conversion from ARGB color to CMYK color.
argbPixel
- The ARGB color presented as a 32-bit integer value.public static int toCmyk(Color pixel)
The conversion from ARGB color to CMYK color.
pixel
- The ARGB color.public static int[] toCmyk(Color[] pixels)
The conversion from ARGB colors to CMYK colors.
pixels
- The ARGB colors.public static Color[] toArgb(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors.
cmykPixels
- The CMYK colors presented as 32-bit integer values.public static Color toArgb(int cmykPixel)
The conversion from CMYK color to ARGB color.
cmykPixel
- The CMYK color presented as a 32-bit integer value.public static int[] toArgb32(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors.
cmykPixels
- The CMYK colors presented as 32-bit integer values.public static Color[] toArgbIcc(int[] cmykPixels)
The conversion from CMYK colors to ARGB colors using Icc conversion with default profiles.
cmykPixels
- The CMYK pixels presented as 32-bit integer values.public static Color[] toArgbIcc(int[] cmykPixels, InputStream cmykIccStream, InputStream rgbIccStream)
The conversion from CMYK colors to ARGB colors using Icc conversion with custom profiles.
cmykPixels
- The CMYK colors presented as 32-bit integer values.cmykIccStream
- The stream containing CMYK Icc profile.rgbIccStream
- The stream containing RGB Icc profile.public static Color toArgbIcc(int cmykPixel)
The conversion from CMYK color to ARGB Color using Icc conversion with default profiles.
cmykPixel
- The CMYK color presented as a 32-bit integer value.public static Color toArgbIcc(int cmykPixel, InputStream cmykIccStream, InputStream rgbIccStream)
The conversion from CMYK color to ARGB color using Icc conversion with custom profile.
cmykPixel
- The CMYK color presented as a 32-bit integer value.cmykIccStream
- The stream containing CMYK Icc profile.rgbIccStream
- The stream containing RGB Icc profile.public static int[] toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)
The conversion from ARGB colors to CMYK colors using Icc conversion with custom profiles.
pixels
- The ARGB colors.rgbIccStream
- The stream containing RGB Icc profile.cmykIccStream
- The stream containing CMYK Icc profile.public static byte[] toCmykIccBytes(int[] pixels, int startIndex, int length, InputStream rgbIccStream, InputStream cmykIccStream)
Converts RGB to CMYK using custom ICC profiles.
pixels
- The RGB colors presented as 32-bit integer values.startIndex
- The start index of RGB color.length
- The number of RGB pixels to convert.rgbIccStream
- The RGB profile stream.cmykIccStream
- The CMYK profile stream.public static int[] toCmykIcc(Color[] pixels)
The conversion from ARGB colors to CMYK colors using Icc conversion with default profiles.
pixels
- The ARGB colors.public static int toCmykIcc(Color pixel)
The conversion from ARGB color to CMYK color using Icc conversion with default profiles.
pixel
- The ARGB color.public static int toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)
The conversion from ARGB color to CMYK color using Icc conversion with custom profiles.
pixel
- The ARGB color.rgbIccStream
- The stream containing RGB Icc profile.cmykIccStream
- The stream containing CMYK Icc profile.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.