IndexedColorSpace Class Documentation

class IndexedColorSpace : ColorSpace

Namespace:com::datalogics::PDFL

Inherits from:
ColorSpace

Detailed Description

Indexed color spaces are used to reduce the amount of memory used for processing images. Indexed color spaces are used when a limited number of colors are needed.

Commonly, an image with an indexed color space can be one third the size of the same image with a standard color space, because the indexed image uses a smaller palette of colors.

Constructor & Destructor Documentation

IndexedColorSpace

IndexedColorSpace(ColorSpace base, int hival, java.util.List< Integer > lookup)

Parameters

base: ColorSpace

The base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or (in PDF 1.3) a Separation or DeviceN space, but not a Pattern space or another Indexed space.

hival: int

an integer that specifies the maximum valid index value. In other words, the color table is to be indexed by integers in the range 0 to hival. hival can be no greater than 255.

lookup: java.util.List< Integer >

a list of integers in the range 0..255. There must be m * (hival + 1) values, where m is the number of components of the base color space.

Create a Indexed color space.

Field Documentation

DEVICE_CMYK

static DEVICE_CMYK

DEVICE_GRAY

static DEVICE_GRAY

DEVICE_RGB

static DEVICE_RGB

DEVICE_RGBA

static DEVICE_RGBA

LAB

static LAB

LAB_A

static LAB_A

Member Function Documentation

delete

synchronized void delete(Boolean disposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized void delete()

Returns:

synchronized void

equals

boolean equals(Object rhs)

Parameters

rhs: Object

Returns:

boolean

finalize

void finalize()

Returns:

void

getBase

ColorSpace getBase()

Returns:

ColorSpace

The base color space in which the values in the color table are to be interpreted. It can be any device or CIE-based color space or (in PDF 1.3) a Separation or DeviceN space, but not a Pattern space or another Indexed space.

getHiVal

int getHiVal()

Returns:

int

an integer that specifies the maximum valid index value. In other words, the color table is to be indexed by integers in the range 0 to hival. hival can be no greater than 255.

getLookup

java.util.List< Integer > getLookup()

Returns:

java.util.List< Integer >

A list of integers in the range 0..255. There must be m * (hival + 1) values, where m is the number of components of the base color space.

getName

String getName()

Returns:

String

The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased.

getNumComponents

int getNumComponents()

Returns:

int

The number of components in the color space.

getPDFObject

PDFObject getPDFObject()

Returns:

PDFObject

The PDFObject associated with the color space.

Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray.

toString

String toString()

Returns:

String

Convert a colorSpace to a string.