PhotoDriver
- Full name:
\Zotlabs\Photo\PhotoDriver
- This class is an Abstract class
Properties
image
width
height
valid
type
types
Methods
supportedTypes
- This method is abstract.
Return Value:
Associative array with mimetype as key and file extension as value.
load
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
mixed | |
$type |
mixed |
destroy
- This method is abstract.
setDimensions
- This method is abstract.
getImage
- This method is abstract.
Return Value:
false on failure, a PHP image resource for GD driver, an \Imagick object for ImageMagick driver.
doScaleImage
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$new_width |
mixed | |
$new_height |
mixed |
rotate
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$degrees |
mixed |
flip
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$horiz |
mixed | |
$vert |
mixed |
cropImageRect
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$maxx |
int | width of the new image |
$maxy |
int | height of the new image |
$x |
int | x-offset for region |
$y |
int | y-offset for region |
$w |
int | width of region |
$h |
int | height of region |
Return Value:
false on failure
imageString
- This method is abstract.
Return Value:
A Binary String.
clearexif
- This method is abstract.
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string | Image |
$type |
string | mimetype |
__destruct
is_valid
getWidth
Return Value:
Width of image in pixels, or false on failure
getHeight
Return Value:
Height of image in pixels, or false on failure
saveImage
Parameters:
Parameter | Type | Description |
---|---|---|
$path |
string | Path and filename where to save the image |
Return Value:
False on failure, otherwise true
getType
Return Value:
False on failure, otherwise mimetype.
getExt
Return Value:
False on failure, otherwise file extension.
scaleImage
Parameters:
Parameter | Type | Description |
---|---|---|
$max |
int | maximum pixel size in either dimension |
$float_height |
bool | (optional) If true allow height to float to any length on tall images, constraining only the width |
Return Value:
false on failure, otherwise void
scaleImageUp
Parameters:
Parameter | Type | Description |
---|---|---|
$min |
mixed |
scaleImageSquare
Parameters:
Parameter | Type | Description |
---|---|---|
$dim |
int | Pixel of square image |
Return Value:
false on failure, otherwise void
cropImage
Parameters:
Parameter | Type | Description |
---|---|---|
$max |
int | size of the new image |
$x |
int | x-offset for region |
$y |
int | y-offset for region |
$w |
int | width of region |
$h |
int | height of region |
Return Value:
false on failure
See Also:
- \Zotlabs\Photo\cropImageRect() -
exif
Parameters:
Parameter | Type | Description |
---|---|---|
$filename |
string |
orient
Parameters:
Parameter | Type | Description |
---|---|---|
$exif |
array |
Return Value:
true if oriented, otherwise false
save
Parameters:
Parameter | Type | Description |
---|---|---|
$arr |
array | |
$skipcheck |
bool | (optional) default false |
storeThumbnail
Parameters:
Parameter | Type | Description |
---|---|---|
$arr |
array | |
$scale |
mixed |
Automatically generated on 2025-03-19