Documentation

Image
in package

Pdf page image class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.2.0

Table of Contents

$height  : int
Image height
$image  : string
Image file name
$preserveResolution  : bool
Flag to preserve image resolution
$resize  : array<string|int, mixed>
Image resize value
$stream  : string
Image stream
$width  : int
Image width
createImageFromFile()  : Image
Create PDF image object from file
createImageFromStream()  : Image
Create PDF image object from data stream
getHeight()  : int
Get the image height
getImage()  : string
Get the image file
getResizedHeight()  : int
Get the image resized height
getResizeDimensions()  : array<string|int, mixed>
Get the image resize dimensions
getResizedWidth()  : int
Get the image resized width
getStream()  : string
Get the image stream
getWidth()  : int
Get the image width
isFile()  : bool
Is image file
isPreserveResolution()  : bool
Get the image preserve resolution flag
isStream()  : bool
Is image stream
loadImageFromFile()  : Image
Load image from file
loadImageFromStream()  : Image
Load image from stream
resize()  : Image
Resize image on whichever dimension is the greatest
resizeToHeight()  : Image
Resize image to height
resizeToWidth()  : Image
Resize image to width
scale()  : Image
Scale image

Properties

$height

Image height

protected int $height = null

$image

Image file name

protected string $image = null

$preserveResolution

Flag to preserve image resolution

protected bool $preserveResolution = false

$resize

Image resize value

protected array<string|int, mixed> $resize = null

$stream

Image stream

protected string $stream = null

$width

Image width

protected int $width = null

Methods

createImageFromFile()

Create PDF image object from file

public static createImageFromFile(string $file) : Image
Parameters
$file : string
Tags
throws
Exception
Return values
Image

createImageFromStream()

Create PDF image object from data stream

public static createImageFromStream(string $stream) : Image
Parameters
$stream : string
Tags
throws
Exception
Return values
Image

getHeight()

Get the image height

public getHeight() : int
Return values
int

getImage()

Get the image file

public getImage() : string
Return values
string

getResizedHeight()

Get the image resized height

public getResizedHeight() : int
Return values
int

getResizeDimensions()

Get the image resize dimensions

public getResizeDimensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResizedWidth()

Get the image resized width

public getResizedWidth() : int
Return values
int

getStream()

Get the image stream

public getStream() : string
Return values
string

getWidth()

Get the image width

public getWidth() : int
Return values
int

isFile()

Is image file

public isFile() : bool
Return values
bool

isPreserveResolution()

Get the image preserve resolution flag

public isPreserveResolution() : bool
Return values
bool

isStream()

Is image stream

public isStream() : bool
Return values
bool

loadImageFromFile()

Load image from file

public loadImageFromFile(string $file) : Image
Parameters
$file : string
Tags
throws
Exception
Return values
Image

loadImageFromStream()

Load image from stream

public loadImageFromStream(string $stream) : Image
Parameters
$stream : string
Tags
throws
Exception
Return values
Image

resize()

Resize image on whichever dimension is the greatest

public resize(int $pixel[, bool $preserveResolution = false ]) : Image
Parameters
$pixel : int
$preserveResolution : bool = false
Return values
Image

resizeToHeight()

Resize image to height

public resizeToHeight(int $height[, bool $preserveResolution = false ]) : Image
Parameters
$height : int
$preserveResolution : bool = false
Return values
Image

resizeToWidth()

Resize image to width

public resizeToWidth(int $width[, bool $preserveResolution = false ]) : Image
Parameters
$width : int
$preserveResolution : bool = false
Return values
Image

scale()

Scale image

public scale(float $scale[, bool $preserveResolution = false ]) : Image
Parameters
$scale : float
$preserveResolution : bool = false
Return values
Image

Search results