메소드 |
설명 |
|
__construct ( string | null $filename = null, boolean | null $strict = false ) |
Constructor |
|
__destruct ( ) |
Destroy image resource |
|
addFilter ( string | callable $filter ) |
Add filter to current image |
|
autoOrient ( ) |
Rotates and/or flips an image automatically so the orientation will be correct (based on exif 'Orientation') |
|
bestFit ( integer $maxWidth, integer $maxHeight ) |
Best fit (proportionally resize to fit in specified width/height)
Shrink the image proportionally to fit inside a $width x $height box |
|
cleanup ( ) |
Clean whole image object |
|
create ( integer $width, integer | null $height = null, null | string $color = null ) |
Create an image from scratch |
|
crop ( integer $left, integer $top, integer $right, integer $bottom ) |
Crop an image |
|
fitToHeight ( integer $height ) |
Fit to height (proportionally resize to specified height) |
|
fitToWidth ( integer $width ) |
Fit to width (proportionally resize to specified width) |
|
getBase64 ( null | string $format = 'gif', integer | null $quality = null, $addMime = true ) : string |
Outputs image as data base64 to use as img src |
|
getBinary ( null | string $format = null, integer | null $quality = null ) : string |
Outputs image as binary data |
|
getHeight ( ) : integer |
Get the current height |
|
getImage ( ) : mixed |
Get the current image resource |
|
getInfo ( ) : array |
|
|
getPath ( ) : string |
Get relative path to image |
|
getUrl ( ) : string |
Get full URL to image (if not CLI mode) |
|
getWidth ( ) : integer |
Get the current width |
|
isGif ( ) : boolean |
|
|
isJpeg ( ) : boolean |
|
|
isLandscape ( ) : boolean |
|
|
isPng ( ) : boolean |
|
|
isPortrait ( ) : boolean |
|
|
isSquare ( ) : boolean |
|
|
loadFile ( string $filename ) |
Load an image |
|
loadResource ( mixed $imageRes ) |
Load image resource |
|
loadString ( string $imageString, boolean | null $strict = false ) |
Load an image |
|
overlay ( string | Image $overlay, string $position = 'bottom right', float | integer $opacity = 0.4, integer $globOffsetX, integer $globOffsetY ) |
Overlay an image on top of another, works with 24-bit PNG alpha-transparency |
|
resize ( integer $width, integer $height ) |
Resize an image to the specified dimensions |
|
save ( null | integer $quality = null ) |
Save an image
The resulting format will be determined by the file extension. |
|
saveAs ( string $filename, null | integer $quality = null ) |
Save an image
The resulting format will be determined by the file extension. |
|
setQuality ( integer $newQuality ) |
|
|
thumbnail ( integer $width, integer | null $height = null, boolean $topIsZero = false ) |
Thumbnail. |
|