Com\Tecnick\Pdf\Image\Import\Png
Tags
Interfaces, Classes, Traits and Enums
- ImageImportInterface
- Com\Tecnick\Pdf\Image\Import\Jpeg
Table of Contents
- getData() : array<string|int, mixed>
- Extract data from a PNG image.
- getChunks() : array<string|int, mixed>
- Extract chunks data from a PNG image.
- getIccpChunk() : array<string|int, mixed>
- Extract the iCCP chunk data.
- getIdatChunk() : array<string|int, mixed>
- Extract the IDAT chunk data.
- getIhdrChunk() : array<string|int, mixed>
- Extract the IHDR chunk data.
- getPlteChunk() : array<string|int, mixed>
- Extract the PLTE chunk data.
- getTrnsChunk() : array<string|int, mixed>
- Extract the tRNS chunk data.
Methods
getData()
Extract data from a PNG image.
public getData(array<string|int,
mixed> $data)
: array<string|int,
mixed>
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
Return values
array<string|int, mixed> —Image raw data array.
getChunks()
Extract chunks data from a PNG image.
protected getChunks(array<string|int,
mixed> $data,
int $offset)
: array<string|int,
mixed>
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
Return values
array<string|int, mixed> —Image raw data array.
getIccpChunk()
Extract the iCCP chunk data.
protected getIccpChunk(Byte $byte,
array<string|int,
mixed> $data,
int &$offset,
int $len)
: array<string|int,
mixed>
Parameters
- $byte : Byte
-
Byte class object.
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
- $len : int
-
NUmber of bytes in this chunk.
Return values
array<string|int, mixed> —Image raw data array.
getIdatChunk()
Extract the IDAT chunk data.
protected getIdatChunk(array<string|int,
mixed> $data,
int &$offset,
int $len)
: array<string|int,
mixed>
The image data chunk (IDAT) stores the actual image data, and multiple image data chunks may occur in a data stream and must be stored in contiguous order.
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
- $len : int
-
NUmber of bytes in this chunk.
Return values
array<string|int, mixed> —Image raw data array.
getIhdrChunk()
Extract the IHDR chunk data.
protected getIhdrChunk(array<string|int,
mixed> $data,
int &$offset)
: array<string|int,
mixed>
The header chunk (IHDR) contains basic information about the image data and must appear as the first chunk, and there must only be one header chunk in a PNG data stream.
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
Return values
array<string|int, mixed> —Image raw data array.
getPlteChunk()
Extract the PLTE chunk data.
protected getPlteChunk(array<string|int,
mixed> $data,
int &$offset,
int $len)
: array<string|int,
mixed>
The palette chunk (PLTE) stores the colormap data associated with the image data. This chunk is presentonly if the image data uses a color palette and must appear before the image data chunk.
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
- $len : int
-
NUmber of bytes in this chunk.
Return values
array<string|int, mixed> —Image raw data array.
getTrnsChunk()
Extract the tRNS chunk data.
protected getTrnsChunk(array<string|int,
mixed> $data,
int &$offset,
int $len)
: array<string|int,
mixed>
Parameters
- $data : array<string|int, mixed>
-
Image raw data.
- $offset : int
-
Current byte offset.
- $len : int
-
NUmber of bytes in this chunk.
Return values
array<string|int, mixed> —Image raw data array.