Method |
Description |
|
__construct ( string $data, array $options = [] ) |
Constructor |
|
applyFilters ( $options ) |
Apply filters that have been defined in the config as seperate classes. |
|
autoRotate ( ) |
Auto rotate the image based on exif data (like from phones)
https://github.com/nik-kor/PHPThumb/blob/master/src/thumb_plugins/jpg_rotate.inc.php |
|
crop ( integer $width, integer $height ) |
Resize and crop |
|
cropQuadrant ( integer $width, integer $height, array $options ) |
Do a quadrant adaptive resize. Supported quadrant values are:
+---+---+---+
| | T | |
+---+---+---+
| L | C | R |
+---+---+---+
| | B | |
+---+---+---+ |
|
get ( ) : string |
Get the image data |
|
pad ( integer $width, integer $height, array $options ) |
Pad an image to desired dimensions. Moves the image into the center and fills the rest with given color. |
|
process ( integer $width = null, integer $height = null, array $options = [] ) |
Take the input from the URL and apply transformations on the image |
|
resize ( integer $width, integer $height ) |
Resize with no cropping |
|
resizeAndOrCrop ( integer $width, integer $height, array $options ) |
Determine which resize and crop to apply |
|
trim ( array $options ) |
Determine which trim to apply. |
|
trimPerc ( array $coords ) |
Trim the source before applying the crop with offset percentages |
|
trimPixels ( array $coords ) |
Trim the source before applying the crop with as offset pixels |
|