Image
in package
Pdf page image class
Tags
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
Return values
ImagecreateImageFromStream()
Create PDF image object from data stream
public
static createImageFromStream(string $stream) : Image
Parameters
- $stream : string
Tags
Return values
ImagegetHeight()
Get the image height
public
getHeight() : int|null
Return values
int|nullgetImage()
Get the image file
public
getImage() : string|null
Return values
string|nullgetResizedHeight()
Get the image resized height
public
getResizedHeight() : int|null
Return values
int|nullgetResizeDimensions()
Get the image resize dimensions
public
getResizeDimensions() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetResizedWidth()
Get the image resized width
public
getResizedWidth() : int|null
Return values
int|nullgetStream()
Get the image stream
public
getStream() : string|null
Return values
string|nullgetWidth()
Get the image width
public
getWidth() : int|null
Return values
int|nullisFile()
Is image file
public
isFile() : bool
Return values
boolisPreserveResolution()
Get the image preserve resolution flag
public
isPreserveResolution() : bool
Return values
boolisStream()
Is image stream
public
isStream() : bool
Return values
boolloadImageFromFile()
Load image from file
public
loadImageFromFile(string $file) : Image
Parameters
- $file : string
Tags
Return values
ImageloadImageFromStream()
Load image from stream
public
loadImageFromStream(string $stream) : Image
Parameters
- $stream : string
Tags
Return values
Imageresize()
Resize image on whichever dimension is the greatest
public
resize(int $pixel[, bool $preserveResolution = false ]) : Image
Parameters
- $pixel : int
- $preserveResolution : bool = false
Return values
ImageresizeToHeight()
Resize image to height
public
resizeToHeight(int $height[, bool $preserveResolution = false ]) : Image
Parameters
- $height : int
- $preserveResolution : bool = false
Return values
ImageresizeToWidth()
Resize image to width
public
resizeToWidth(int $width[, bool $preserveResolution = false ]) : Image
Parameters
- $width : int
- $preserveResolution : bool = false
Return values
Imagescale()
Scale image
public
scale(float $scale[, bool $preserveResolution = false ]) : Image
Parameters
- $scale : float
- $preserveResolution : bool = false