\Pop\Pdf\Document\PageImage

Pdf page image class

Summary

Methods
Properties
Constants
createImageFromFile()
createImageFromStream()
loadImageFromFile()
loadImageFromStream()
resizeToWidth()
resizeToHeight()
resize()
scale()
isFile()
isStream()
getImage()
getStream()
getResizeDimensions()
isPreserveResolution()
No public properties found
No constants found
No protected methods found
$image
$stream
$width
$height
$resize
$preserveResolution
N/A
No private methods found
No private properties found
N/A

Properties

$image

$image : string

Image file name

Type

string

$stream

$stream : string

Image stream

Type

string

$width

$width : integer

Image width

Type

integer

$height

$height : integer

Image height

Type

integer

$resize

$resize : array

Image resize value

Type

array

$preserveResolution

$preserveResolution : boolean

Flag to preserve image resolution

Type

boolean

Methods

createImageFromFile()

createImageFromFile(string  $file) : \Pop\Pdf\Document\Page\Image

Create PDF image object from file

Parameters

string $file

Throws

\Pop\Pdf\Document\Page\Exception

Returns

\Pop\Pdf\Document\Page\Image

createImageFromStream()

createImageFromStream(string  $stream) : \Pop\Pdf\Document\Page\Image

Create PDF image object from data stream

Parameters

string $stream

Throws

\Pop\Pdf\Document\Page\Exception

Returns

\Pop\Pdf\Document\Page\Image

loadImageFromFile()

loadImageFromFile(string  $file) : \Pop\Pdf\Document\Page\Image

Load image from file

Parameters

string $file

Throws

\Pop\Pdf\Document\Page\Exception

Returns

\Pop\Pdf\Document\Page\Image

loadImageFromStream()

loadImageFromStream(string  $stream) : \Pop\Pdf\Document\Page\Image

Load image from stream

Parameters

string $stream

Throws

\Pop\Pdf\Document\Page\Exception

Returns

\Pop\Pdf\Document\Page\Image

resizeToWidth()

resizeToWidth(integer  $width, boolean  $preserveResolution = false) : \Pop\Pdf\Document\Page\Image

Resize image to width

Parameters

integer $width
boolean $preserveResolution

Returns

\Pop\Pdf\Document\Page\Image

resizeToHeight()

resizeToHeight(integer  $height, boolean  $preserveResolution = false) : \Pop\Pdf\Document\Page\Image

Resize image to height

Parameters

integer $height
boolean $preserveResolution

Returns

\Pop\Pdf\Document\Page\Image

resize()

resize(integer  $pixel, boolean  $preserveResolution = false) : \Pop\Pdf\Document\Page\Image

Resize image on whichever dimension is the greatest

Parameters

integer $pixel
boolean $preserveResolution

Returns

\Pop\Pdf\Document\Page\Image

scale()

scale(float  $scale, boolean  $preserveResolution = false) : \Pop\Pdf\Document\Page\Image

Scale image

Parameters

float $scale
boolean $preserveResolution

Returns

\Pop\Pdf\Document\Page\Image

isFile()

isFile() : boolean

Is image file

Returns

boolean

isStream()

isStream() : boolean

Is image stream

Returns

boolean

getImage()

getImage() : string

Get the image file

Returns

string

getStream()

getStream() : string

Get the image stream

Returns

string

getResizeDimensions()

getResizeDimensions() : array

Get the image resize dimensions

Returns

array

isPreserveResolution()

isPreserveResolution() : boolean

Get the image preserve resolution flag

Returns

boolean