Properties

$width

$width : integer

Image width

Type

integer

$height

$height : integer

Image height

Type

integer

$mime

$mime : string

Image mime

Type

string

$colorMode

$colorMode : mixed

Image color mode

Type

mixed

$channels

$channels : integer

Number of channels in the image

Type

integer

$depth

$depth : integer

Image bit-depth

Type

integer

$basename

$basename : string

Image basename

Type

string

$filename

$filename : string

Image filename

Type

string

$extension

$extension : string

Image extension

Type

string

$fullpath

$fullpath : string

Image fullpath

Type

string

$colorTotal

$colorTotal : integer

Image total number of colors

Type

integer

$alpha

$alpha : boolean

Flag for if the image has an alpha channel

Type

boolean

$imageData

$imageData : mixed

Image data

Type

mixed

$imageDataLength

$imageDataLength : integer

Image data length

Type

integer

$resource

$resource : resource

GD image resource

Type

resource

$x

$x : array

Image X Coordinate

Type

array

$y

$y : array

Image Y Coordinate

Type

array

$index

$index : integer

Image object index

Type

integer

$objects

$objects : array

Image objects

Type

array

$convertedImage

$convertedImage : string

Converted GIF to PNG image

Type

string

$resizedImage

$resizedImage : string

Resized image

Type

string

Methods

__construct()

__construct(string  $imageFile, integer  $x, integer  $y, array  $resize = null, boolean  $preserveResolution = false) : \Pop\Pdf\Build\Image\Parser

Constructor

Instantiate a image parser object

Parameters

string $imageFile
integer $x
integer $y
array $resize
boolean $preserveResolution

Throws

\Pop\Pdf\Build\Image\Exception

Returns

\Pop\Pdf\Build\Image\Parser

setImage()

setImage(string  $imageFile, array  $resize = null, boolean  $preserveResolution = false) : \Pop\Pdf\Build\Image\Parser

Set the image file

Parameters

string $imageFile
array $resize
boolean $preserveResolution

Returns

\Pop\Pdf\Build\Image\Parser

setIndex()

setIndex(integer  $i) : \Pop\Pdf\Build\Image\Parser

Set the image object index

Parameters

integer $i

Returns

\Pop\Pdf\Build\Image\Parser

getX()

getX() : integer

Get the X coordinate

Returns

integer

getY()

getY() : integer

Get the Y coordinate

Returns

integer

getIndex()

getIndex() : integer

Get the image object index

Returns

integer

getStream()

getStream() : string

Get the image stream

Returns

string

getXObject()

getXObject() : string

Get the XObject

Returns

string

getObjects()

getObjects() : array

Get the image objects

Returns

array

parse()

parse() : void

Parse the image data and create the image objects

Throws

\Pop\Pdf\Build\Image\Exception

parsePng()

parsePng() : void

Parse the PNG image data

Throws

\Pop\Pdf\Build\Image\Exception

parseJpeg()

parseJpeg() : void

Parse the JPG image data

Throws

\Pop\Pdf\Build\Image\Exception

createResource()

createResource() : void

Create a new image resource based on the current image type of the image object.

convertImage()

convertImage() : void

Method to convert the image from GIF to PNG.

resizeImage()

resizeImage(array  $resize) : void

Method to resize the image.

Parameters

array $resize

Throws

\Pop\Pdf\Build\Image\Exception

readInt()

readInt(string  $data) : integer

Method to read an unsigned integer.

Parameters

string $data

Returns

integer