Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public interface Jpeg2000.Colors

Converts colour components the file does not describe itself, as when a PDF gives the image’s colour space in its own dictionary.

Methods

public abstract int getComponents()The number of components a colour has; ignored for an indexed space.
public abstract boolean isIndexed()True for an indexed (palette) space, which takes the raw sample as its one component.
public abstract int toRgb(double[] components)The RGB value (0xRRGGBB) of the colour whose components, each scaled to 0..1 (or the raw index for an indexed space), are in components.

Method details

getComponents

public abstract int getComponents()
The number of components a colour has; ignored for an indexed space.

isIndexed

public abstract boolean isIndexed()
True for an indexed (palette) space, which takes the raw sample as its one component.

toRgb

public abstract int toRgb(double[] components)
The RGB value (0xRRGGBB) of the colour whose components, each scaled to 0..1 (or the raw index for an indexed space), are in components.