Documentation

Image
in package

Pdf page image class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
5.2.0

Table of Contents

Properties

$height  : int|null
Image height
$image  : string|null
Image file name
$preserveResolution  : bool
Flag to preserve image resolution
$resize  : array<string|int, mixed>|null
Image resize value
$stream  : string
Image stream
$width  : int|null
Image width

Methods

createImageFromFile()  : Image
Create PDF image object from file
createImageFromStream()  : Image
Create PDF image object from data stream
getHeight()  : int|null
Get the image height
getImage()  : string|null
Get the image file
getResizedHeight()  : int|null
Get the image resized height
getResizeDimensions()  : array<string|int, mixed>|null
Get the image resize dimensions
getResizedWidth()  : int|null
Get the image resized width
getStream()  : string|null
Get the image stream
getWidth()  : int|null
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|null $height = null

$image

Image file name

protected string|null $image = null

$preserveResolution

Flag to preserve image resolution

protected bool $preserveResolution = false

$resize

Image resize value

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

$stream

Image stream

protected string $stream = null

$width

Image width

protected int|null $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|null
Return values
int|null

getImage()

Get the image file

public getImage() : string|null
Return values
string|null

getResizedHeight()

Get the image resized height

public getResizedHeight() : int|null
Return values
int|null

getResizeDimensions()

Get the image resize dimensions

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

getResizedWidth()

Get the image resized width

public getResizedWidth() : int|null
Return values
int|null

getStream()

Get the image stream

public getStream() : string|null
Return values
string|null

getWidth()

Get the image width

public getWidth() : int|null
Return values
int|null

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

        
On this page

Search results