DeviceCMYK

Overview

DeviceCMYK is a class in Aspose.Pdf FOSS for Java. Inherits from: ColorSpaceBase.

The DeviceCMYK color space (ISO 32000-1:2008, §8.6.4.4).

Properties

NameTypeAccessDescription
nameStringRead
numberOfComponentsintRead
INSTANCEDeviceCMYKReadSingleton instance.

Methods

SignatureDescription
getName()String
getNumberOfComponents()int
toRGBInt(c: double, m: double, y: double, k: double)intConverts CMYK components [0..1] to a packed ARGB int using the naive
subtractive formula
   R = (1 - min(1, C + K)) * 255
   G = (1 - min(1, M + K)) * 255
   B = (1 - min(1, Y + K)) * 255
 

This is the “no ICC profile” mapping: it preserves the algebraic primaries — pure C maps to {@code (0,255,255)}, pure K to {@code (0,0,0)}, registration black {@code (1,1,1,1)} to black, and white {@code (0,0,0,0)} to white — which is what the public API contract assumes (see {@code ColorSpaceTest.testDeviceCMYKToInt} and {@code AsposeColorActionPortedTest.createDeviceCMYK}). | | resolve(csObj: COSBase, resources: Resources, parser: PDFParser)ColorSpaceBase | Resolves a color space from a PDF object. |

See Also