# IccProfile

## Content

# Class: IccProfile

Represents a PDF ICC profile stream defining a color space transformation.

## Extends

- [`ObjectBase`](ObjectBase)

## Accessors

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### metadata

#### Get Signature

```ts
get metadata(): Uint8Array<ArrayBufferLike>;
```

Gets the XMP metadata stream associated with the ICC profile.
Returns `null` if no metadata stream is present.

##### Returns

`Uint8Array`&lt;`ArrayBufferLike`&gt;

#### Set Signature

```ts
set metadata(value): void;
```

Sets the XMP metadata stream associated with the ICC profile.

##### Parameters

###### value

`Uint8Array`

##### Returns

`void`

***

### n

#### Get Signature

```ts
get n(): number;
```

Gets the number of color components in the color space described by the ICC profile data.
Valid values are 1, 3, or 4.

##### Returns

`number`

#### Set Signature

```ts
set n(value): void;
```

Sets the number of color components in the color space described by the ICC profile data.
Valid values are 1, 3, or 4.

##### Parameters

###### value

`number`

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### range

#### Get Signature

```ts
get range(): number[];
```

Gets an array of `2 * n` numbers `[min0 max0, min1 max1, ...]` specifying the minimum
and maximum valid values of the corresponding color components.
These values shall match the information in the ICC profile.
Returns `null` if not set.

##### Returns

`number`[]

#### Set Signature

```ts
set range(value): void;
```

Sets an array of `2 * n` numbers `[min0 max0, min1 max1, ...]` specifying the minimum
and maximum valid values of the corresponding color components.
These values shall match the information in the ICC profile.
Pass `null` to remove the entry.

##### Parameters

###### value

`number`[]

##### Returns

`void`

## Methods

### create()

```ts
static create(data, om?): IccProfile;
```

Creates an IccProfile from the given ICC profile data.
Returns `null` if the data is invalid or in an unsupported format.

#### Parameters

##### data

`Uint8Array`

The raw ICC profile bytes.

##### om?

[`ObjectManager`](ObjectManager)

An optional object manager that controls the lifetime of the object.

#### Returns

`IccProfile`

***

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
