setasign\SetaPDF2\Core\IccProfile

Parser ICC profile parser

File: /SetaPDF v2/Core/IccProfile/Parser.php
Old class name (alias): \SetaPDF_Core_IccProfile_Parser

This ICC profile parser is based on the specs ICC.1:2001-04 and ICC.1:2010. The parser actually only offers an access to the header data and description tag.

Class hierarchy

Summary

Properties

$_descriptionData

protected ?array Parser::$_descriptionData

$_headerData

protected ?array Parser::$_headerData

$_reader

The reader instance

$_tagsData

protected ?array Parser::$_tagsData

Information about tagged element data offset and size


Methods

__construct()

The constructor.

Parameters
$reader : string|\SetaPDF_Core_Reader_Binary
 
Exceptions

Throws \setasign\SetaPDF2\Core\Exception

_parseDescTag()

protected Parser::_parseDescTag (
void
): void

Parse the description tag.

_parseHeader()

protected Parser::_parseHeader (
void
): void

Parse the header data.

Exceptions

Throws \setasign\SetaPDF2\Core\Exception

_parseTagTable()

protected Parser::_parseTagTable (
void
): void

Parse the tag table.

cleanUp()

public Parser::cleanUp (
void
): void

Release resources.

getClass()

public Parser::getClass (
void
): string

Get the Profile/Device Class signature.

See

getColorSpace()

public Parser::getColorSpace (
bool $signature = false
): string

Get the color space signature or readable form.

Parameters
$signature : bool
 
See

getCreator()

public Parser::getCreator (
void
): string

Get the Profile Creator signature.

See

getDescription()

public Parser::getDescription (
string $encoding = 'UTF-8',
null $languageCode = null,
null $countryCode = null
): array|null|string

Get description.

If the profile is of version 4 a language and country code can be passed to get a specific description entry.

To get an overview of all resolved description data see getDescriptionData().

Parameters
$encoding : string
 
$languageCode : null
 
$countryCode : null
 
See

getDescriptionData()

public Parser::getDescriptionData (
void
): ?array

Get all resolved description data.

getDeviceAttributes()

public Parser::getDeviceAttributes (
void
): string

Get the Device attributes.

getDeviceManufacturer()

public Parser::getDeviceManufacturer (
void
): string

Get the Device manufacturer of the device for which this profile is created.

See

getDeviceModel()

public Parser::getDeviceModel (
void
): string

Get the Device model of the device for which this profile is created.

See

getFlags()

public Parser::getFlags (
void
): string

Get Profile flags.

See

getHeaderData()

public Parser::getHeaderData (
void
): array

Get all data resolved by the header description.

getNumberOfComponents()

public Parser::getNumberOfComponents (
void
): int

Get the number of components/channels.

See
  • Spec ICC.1:2001-04 - Table 48

getPCS()

public Parser::getPCS (
void
): string

Get the Profile Connection Space signature.

See

getPreferredCMM()

public Parser::getPreferredCMM (
void
): string

Get preferred Color Management Module.

See

getPrimaryPlatform()

public Parser::getPrimaryPlatform (
void
): string

Get the Primary Platform signature.

See

getProfileSize()

public Parser::getProfileSize (
void
): int

Get the profile size.

See

getReader()

Get the reader instance.

getVersion()

public Parser::getVersion (
bool $raw = false
): string

Get the profile version number.

A 4 byte string: Byte 0 = Major Revision in Binary-Coded Decimal Byte 1 = Minor Revision & Bug Fix Revision in each nibble in Binary-Coded Decimal Byte 2 + 3 = reserved, must be set to 0

Parameters
$raw : bool
 
See