-
Run install check and load the image.
-
check() : boolChecks if GD is enabled and bundled. Bundled GD is required for some methods to work.
-
__destruct() : voidDestroys the loaded image to free up resources.
-
loadImage() : voidLoads an image into GD.
-
Execute a resize.
-
Execute a crop.
-
Execute a rotation.
-
Execute a flip.
-
Execute a sharpen.
-
Execute a reflection.
-
Execute a watermarking.
-
Execute a background.
-
Execute a save.
-
Execute a render.
-
Get the GD saving function and image type for this extension.
-
Create an empty image with the given width and height.
-
public function __construct(string $file)
Run install check and load the image. -
public static function check()
Checks if GD is enabled and bundled. Bundled GD is required for some methods to work.Exceptions will be thrown from those methods when GD is not bundled. -
public function __destruct()
Destroys the loaded image to free up resources. -
protected function loadImage()
Loads an image into GD. -
protected function doResize(int $width, int $height)
Execute a resize. -
protected function doCrop(int $width, int $height, int $offsetX, int $offsetY)
Execute a crop. -
protected function doRotate(int $degrees)
Execute a rotation. -
protected function doFlip(int $direction)
Execute a flip. -
protected function doSharpen(int $amount)
Execute a sharpen. -
protected function doReflection(int $height, int $opacity, bool $fadeIn)
Execute a reflection. -
protected function doWatermark(variable $watermark, int $offsetX, int $offsetY, int $opacity)
Execute a watermarking. -
protected function doBackground(int $r, int $g, int $b, int $opacity)
Execute a background. -
protected function doSave(string $file, variable $quality)
Execute a save. -
protected function doRender(string $type, variable $quality)
Execute a render. -
protected function saveFunction(string $extension, int $quality)
Get the GD saving function and image type for this extension.Also normalizes the quality setting -
protected function create(int $width, int $height)
Create an empty image with the given width and height.