Image\Adapter\AbstractAdapter
AbstractSource on GitHubAll image adapters must use this class
@template TImage of object
Phalcon\Image\Adapter\AbstractAdapter- implementsPhalcon\Image\Adapter\AdapterInterface
Uses Phalcon\Contracts\Image\ImageTypes · Phalcon\Image\Enum · Phalcon\Image\Exception · Phalcon\Image\Exceptions\ImageTooLarge · Phalcon\Image\Exceptions\InvalidColor · Phalcon\Image\Exceptions\MissingDimensions · Phalcon\Image\Exceptions\MissingHeight · Phalcon\Image\Exceptions\MissingWidth
Method Summary
publicAdapterInterfacebackground(string $color,int $opacity = 100)Set the background color of an image
publicAdapterInterfaceblur(int $radius)Blur image
publicAdapterInterfacecrop(int $width,int $height,mixed $offsetX = null,mixed $offsetY = null)Crop an image to the given size
publicAdapterInterfaceflip(int $direction)Flip the image along the horizontal or vertical axis
publicintgetHeight()publicgetImage()publicstringgetMime()publicstringgetRealpath()publicintgetType()publicintgetWidth()publicAdapterInterfacemask(AdapterInterface $mask)Composite one image onto another
publicAdapterInterfacepixelate(int $amount)Pixelate image
publicAdapterInterfacereflection(int $height,int $opacity = 100,bool $fadeIn = false)Add a reflection to an image
publicstringrender(string|null $extension = null,int $quality = 100)Render the image and return the binary string
publicAdapterInterfaceresize(int|null $width = null,int|null $height = null,int $master = Enum::AUTO)Resize the image to the given size
publicAdapterInterfacerotate(int $degrees)Rotate the image by a given amount
publicAdapterInterfacesave(string|null $file = null,int $quality = -1)Save the image
publicAdapterInterfacesharpen(int $amount)Sharpen the image by a given amount
publicAdapterInterfacetext(string $text,mixed $offsetX = false,mixed $offsetY = false,int $opacity = 100,string $color = "000000",int $size = 12,string|null $fontFile = null)Add a text to an image with a specified opacity
publicAdapterInterfacewatermark(AdapterInterface $watermark,int $offsetX = 0,int $offsetY = 0,int $opacity = 100)Add a watermark to an image with the specified opacity
protectedvoidassertPixelLimit(int $width,int $height)Rejects an image whose pixel count exceeds the configured limit before
protectedintcheckHighLow(int $value,int $min = 0,int $max = 100)protectedvoidprocessBackground(int $red,int $green,int $blue,int $opacity)Renders the supplied colour onto the image as the background. Channels
protectedvoidprocessBlur(int $radius)Applies a blur. The radius is already clamped to 1-100.
protectedvoidprocessCrop(int $width,int $height,int $offsetX,int $offsetY)Crops the image. Width, height and both offsets are already normalized
protectedvoidprocessFlip(int $direction)Flips the image. The direction is already normalized to
protectedprocessMask(AdapterInterface $mask)Composites the supplied image as a mask onto this one. The mask is read
protectedvoidprocessPixelate(int $amount)Pixelates the image. The amount is already at least 2.
protectedvoidprocessReflection(int $height,int $opacity,bool $fadeIn)Adds a reflection. The height is clamped to the image height and the
protectedprocessRender(string $extension,int $quality)Renders the image to a binary string. The extension is non-empty and the
protectedvoidprocessResize(int $width,int $height)Resizes the image. Width and height are already resolved to positive
protectedvoidprocessRotate(int $degrees)Rotates the image. The degrees value is already normalized to -180..180.
protectedboolprocessSave(string $file,int $quality)Saves the image to the supplied file path.
protectedvoidprocessSharpen(int $amount)Sharpens the image. The amount is already clamped to 1-100.
protectedvoidprocessText(string $text,mixed $offsetX,mixed $offsetY,int $opacity,int $red,int $green,int $blue,int $size,string|null $fontFile = null)Renders text onto the image. The opacity is clamped to 0-100 and the
protectedvoidprocessWatermark(AdapterInterface $watermark,int $offsetX,int $offsetY,int $opacity)Composites the supplied watermark onto this image. Offsets and opacity
Constants
intDEFAULT_MAX_PIXELS = 50000000Default cap on the pixel count (width * height) of a loaded image, used when the constructor is not given an explicit limit. Bounds the memory a crafted image (decompression bomb / pixel flood) can force the backend to allocate (CWE-409). Generous by default; override per instance.
Properties
protectedstring$fileprotectedint$heightprotectedTImage|null$image = nullThe handle of the underlying backend. Every adapter assigns it in its constructor and releases it in its destructor.
protectedint$maxPixels = 0Maximum allowed pixel count (width * height) for a loaded image. Zero disables the check.
protectedstring$mimeprotectedstring$realpathprotectedint$typeImage type
Driver dependent
protectedint$widthImage width
Methods
background()
public function background(
string $color,
int $opacity = 100
): AdapterInterface;Set the background color of an image
blur()
public function blur( int $radius ): AdapterInterface;Blur image
crop()
public function crop(
int $width,
int $height,
mixed $offsetX = null,
mixed $offsetY = null
): AdapterInterface;Crop an image to the given size
flip()
public function flip( int $direction ): AdapterInterface;Flip the image along the horizontal or vertical axis
getHeight()
public function getHeight(): int;getImage()
public function getImage();getMime()
public function getMime(): string;getRealpath()
public function getRealpath(): string;getType()
public function getType(): int;getWidth()
public function getWidth(): int;mask()
public function mask( AdapterInterface $mask ): AdapterInterface;Composite one image onto another
The mask is read through its public render() output rather than its internal handle, so a mask created with a different backend composites correctly. The cost is one encode/decode round trip per call, which is worth knowing inside loops.
pixelate()
public function pixelate( int $amount ): AdapterInterface;Pixelate image
reflection()
public function reflection(
int $height,
int $opacity = 100,
bool $fadeIn = false
): AdapterInterface;Add a reflection to an image
render()
public function render(
string|null $extension = null,
int $quality = 100
): string;Render the image and return the binary string
resize()
public function resize(
int|null $width = null,
int|null $height = null,
int $master = Enum::AUTO
): AdapterInterface;Resize the image to the given size
rotate()
public function rotate( int $degrees ): AdapterInterface;Rotate the image by a given amount
save()
public function save(
string|null $file = null,
int $quality = -1
): AdapterInterface;Save the image
sharpen()
public function sharpen( int $amount ): AdapterInterface;Sharpen the image by a given amount
text()
public function text(
string $text,
mixed $offsetX = false,
mixed $offsetY = false,
int $opacity = 100,
string $color = "000000",
int $size = 12,
string|null $fontFile = null
): AdapterInterface;Add a text to an image with a specified opacity
The offsets accept false to centre the text on that axis, so they are
wider than the int the interface documents.
watermark()
public function watermark(
AdapterInterface $watermark,
int $offsetX = 0,
int $offsetY = 0,
int $opacity = 100
): AdapterInterface;Add a watermark to an image with the specified opacity
The watermark is read through its public render() output rather than its internal handle, so a watermark created with a different backend composites correctly. The cost is one encode/decode round trip per call, which is worth knowing inside loops.
assertPixelLimit()
protected function assertPixelLimit(
int $width,
int $height
): void;Rejects an image whose pixel count exceeds the configured limit before the backend allocates it, bounding decompression-bomb / pixel-flood memory use (CWE-409). A zero limit disables the check.
checkHighLow()
protected function checkHighLow(
int $value,
int $min = 0,
int $max = 100
): int;processBackground()
abstract protected function processBackground(
int $red,
int $green,
int $blue,
int $opacity
): void;Renders the supplied colour onto the image as the background. Channels are 0-255; the opacity is the validated 0-100 value.
processBlur()
abstract protected function processBlur( int $radius ): void;Applies a blur. The radius is already clamped to 1-100.
processCrop()
abstract protected function processCrop(
int $width,
int $height,
int $offsetX,
int $offsetY
): void;Crops the image. Width, height and both offsets are already normalized to fit within the current canvas.
processFlip()
abstract protected function processFlip( int $direction ): void;Flips the image. The direction is already normalized to Enum::HORIZONTAL or Enum::VERTICAL.
processMask()
abstract protected function processMask( AdapterInterface $mask );Composites the supplied image as a mask onto this one. The mask is read through its public render() output, so it may be any adapter backend.
processPixelate()
abstract protected function processPixelate( int $amount ): void;Pixelates the image. The amount is already at least 2.
processReflection()
abstract protected function processReflection(
int $height,
int $opacity,
bool $fadeIn
): void;Adds a reflection. The height is clamped to the image height and the opacity to 0-100.
processRender()
abstract protected function processRender(
string $extension,
int $quality
);Renders the image to a binary string. The extension is non-empty and the quality is already clamped to 1-100. Returns the encoded bytes.
processResize()
abstract protected function processResize(
int $width,
int $height
): void;Resizes the image. Width and height are already resolved to positive integers per the requested resize mode.
processRotate()
abstract protected function processRotate( int $degrees ): void;Rotates the image. The degrees value is already normalized to -180..180.
processSave()
abstract protected function processSave(
string $file,
int $quality
): bool;Saves the image to the supplied file path.
processSharpen()
abstract protected function processSharpen( int $amount ): void;Sharpens the image. The amount is already clamped to 1-100.
processText()
abstract protected function processText(
string $text,
mixed $offsetX,
mixed $offsetY,
int $opacity,
int $red,
int $green,
int $blue,
int $size,
string|null $fontFile = null
): void;Renders text onto the image. The opacity is clamped to 0-100 and the colour is supplied as separate 0-255 channels.
processWatermark()
abstract protected function processWatermark(
AdapterInterface $watermark,
int $offsetX,
int $offsetY,
int $opacity
): void;Composites the supplied watermark onto this image. Offsets and opacity are already clamped to the valid range; the watermark is read through its public render() output, so it may be any adapter backend.
Image\Adapter\AdapterInterface
InterfaceSource on GitHubInterface for Phalcon\Image\Adapter classes
Phalcon\Image\Adapter\AdapterInterface
Uses Phalcon\Image\Enum
Method Summary
publicAdapterInterfacebackground(string $color,int $opacity = 100)Add a background to an image
publicAdapterInterfaceblur(int $radius)Blur an image
publicAdapterInterfacecrop(int $width,int $height,int|null $offsetX = null,int|null $offsetY = null)Crop an image
publicAdapterInterfaceflip(int $direction)Flip an image
publicintgetHeight()publicintgetWidth()publicAdapterInterfacemask(AdapterInterface $mask)Add a mask to an image
publicAdapterInterfacepixelate(int $amount)Pixelate an image
publicAdapterInterfacereflection(int $height,int $opacity = 100,bool $fadeIn = false)Reflect an image
publicstringrender(string|null $extension = null,int $quality = 100)Render an image
publicAdapterInterfaceresize(int|null $width = null,int|null $height = null,int $master = Enum::AUTO)Resize an image
publicAdapterInterfacerotate(int $degrees)Rotate an image
publicAdapterInterfacesave(string|null $file = null,int $quality = 100)Save an image
publicAdapterInterfacesharpen(int $amount)Sharpen an image
publicAdapterInterfacetext(string $text,int $offsetX = 0,int $offsetY = 0,int $opacity = 100,string $color = "000000",int $size = 12,string|null $fontFile = null)Adds text on an image
publicAdapterInterfacewatermark(AdapterInterface $watermark,int $offsetX = 0,int $offsetY = 0,int $opacity = 100)Add a watermark on an image
Methods
background()
public function background(
string $color,
int $opacity = 100
): AdapterInterface;Add a background to an image
blur()
public function blur( int $radius ): AdapterInterface;Blur an image
crop()
public function crop(
int $width,
int $height,
int|null $offsetX = null,
int|null $offsetY = null
): AdapterInterface;Crop an image
flip()
public function flip( int $direction ): AdapterInterface;Flip an image
getHeight()
public function getHeight(): int;getWidth()
public function getWidth(): int;mask()
public function mask( AdapterInterface $mask ): AdapterInterface;Add a mask to an image
pixelate()
public function pixelate( int $amount ): AdapterInterface;Pixelate an image
reflection()
public function reflection(
int $height,
int $opacity = 100,
bool $fadeIn = false
): AdapterInterface;Reflect an image
render()
public function render(
string|null $extension = null,
int $quality = 100
): string;Render an image
resize()
public function resize(
int|null $width = null,
int|null $height = null,
int $master = Enum::AUTO
): AdapterInterface;Resize an image
rotate()
public function rotate( int $degrees ): AdapterInterface;Rotate an image
save()
public function save(
string|null $file = null,
int $quality = 100
): AdapterInterface;Save an image
sharpen()
public function sharpen( int $amount ): AdapterInterface;Sharpen an image
text()
public function text(
string $text,
int $offsetX = 0,
int $offsetY = 0,
int $opacity = 100,
string $color = "000000",
int $size = 12,
string|null $fontFile = null
): AdapterInterface;Adds text on an image
watermark()
public function watermark(
AdapterInterface $watermark,
int $offsetX = 0,
int $offsetY = 0,
int $opacity = 100
): AdapterInterface;Add a watermark on an image
Image\Adapter\Gd
ClassSource on GitHubImage manipulation backed by the GD extension.
Capabilities:
| Aspect | Support |
|---|---|
| Load formats | GIF, JPEG, JPEG 2000, PNG, WEBP, WBMP, XBM |
| Render/save formats | GIF, JPEG, PNG, WBMP, WEBP, XBM |
| Backend-only API | none |
Unsupported render/save formats raise Phalcon\Image\Exceptions\UnsupportedImageType. Visual semantics differ from the Imagick adapter: blur() applies repeated 3x3 Gaussian convolutions (the radius is the number of passes), while sharpen and reflection use GD’s own scales. Switching the factory backend can change the rendered output.
@extends AbstractAdapter<GdImage>
Phalcon\Image\Adapter\AbstractAdapterPhalcon\Image\Adapter\Gd
Uses GdImage · Phalcon\Contracts\Image\ImageTypes · Phalcon\Image\Enum · Phalcon\Image\Exception · Phalcon\Image\Exceptions\ExtensionNotLoaded · Phalcon\Image\Exceptions\ImageLoadFailed · Phalcon\Image\Exceptions\TextRenderingFailed · Phalcon\Image\Exceptions\UnsupportedImageType · Phalcon\Image\Exceptions\VersionMismatch · Phalcon\Traits\Php\FileTrait · Phalcon\Traits\Php\InfoTrait
Method Summary
public__construct(string $file,int|null $width = null,int|null $height = null,int $maxPixels = 0)Loads an image from a file, or creates a blank canvas.
public__destruct()Destructor
publicAbstractAdaptercreate(int $width,int $height)Creates a blank true-color canvas of the given dimensions, without the
publicstringgetVersion()protectedvoidprocessBackground(int $red,int $green,int $blue,int $opacity)protectedvoidprocessBlur(int $radius)protectedprocessCreate(int $width,int $height)protectedvoidprocessCrop(int $width,int $height,int $offsetX,int $offsetY)protectedvoidprocessFlip(int $direction)protectedprocessMask(AdapterInterface $mask)protectedvoidprocessPixelate(int $amount)protectedvoidprocessReflection(int $height,int $opacity,bool $fadeIn)protectedfalse|stringprocessRender(string $extension,int $quality)protectedvoidprocessResize(int $width,int $height)protectedvoidprocessRotate(int $degrees)protectedboolprocessSave(string $file,int $quality)protectedvoidprocessSharpen(int $amount)protectedvoidprocessText(string $text,mixed $offsetX,mixed $offsetY,int $opacity,int $red,int $green,int $blue,int $size,string|null $fontFile = null)protectedvoidprocessWatermark(AdapterInterface $watermark,int $offsetX,int $offsetY,int $opacity)Methods
__construct()
public function __construct(
string $file,
int|null $width = null,
int|null $height = null,
int $maxPixels = 0
);Loads an image from a file, or creates a blank canvas.
When the file exists it is loaded. When the file does not exist and both a width and a height are supplied, a blank true-color canvas is created instead - its realpath, mime and type then describe a PNG canvas rather than the named file. Prefer Gd::create() for the canvas case; this dual mode is slated for removal in the next major version.
__destruct()
public function __destruct();Destructor
create()
public static function create(
int $width,
int $height
): AbstractAdapter;Creates a blank true-color canvas of the given dimensions, without the load-or-create ambiguity of the constructor.
getVersion()
public function getVersion(): string;processBackground()
protected function processBackground(
int $red,
int $green,
int $blue,
int $opacity
): void;processBlur()
protected function processBlur( int $radius ): void;processCreate()
protected function processCreate(
int $width,
int $height
);processCrop()
protected function processCrop(
int $width,
int $height,
int $offsetX,
int $offsetY
): void;processFlip()
protected function processFlip( int $direction ): void;processMask()
protected function processMask( AdapterInterface $mask );processPixelate()
protected function processPixelate( int $amount ): void;processReflection()
protected function processReflection(
int $height,
int $opacity,
bool $fadeIn
): void;processRender()
protected function processRender(
string $extension,
int $quality
): false|string;processResize()
protected function processResize(
int $width,
int $height
): void;processRotate()
protected function processRotate( int $degrees ): void;processSave()
protected function processSave(
string $file,
int $quality
): bool;processSharpen()
protected function processSharpen( int $amount ): void;processText()
protected function processText(
string $text,
mixed $offsetX,
mixed $offsetY,
int $opacity,
int $red,
int $green,
int $blue,
int $size,
string|null $fontFile = null
): void;processWatermark()
protected function processWatermark(
AdapterInterface $watermark,
int $offsetX,
int $offsetY,
int $opacity
): void;Image\Adapter\Imagick
ClassSource on GitHubPhalcon\Image\Adapter\Imagick
Image manipulation support. Resize, rotate, crop etc.
$image = new \Phalcon\Image\Adapter\Imagick("upload/test.jpg");
$image->resize(200, 200)->rotate(90)->crop(100, 100);
if ($image->save()) {
echo "success";
}Capabilities:
| Aspect | Support |
|---|---|
| Load formats | Whatever the linked ImageMagick build supports |
| Render/save formats | Whatever the linked ImageMagick build supports |
| Backend-only API | liquidRescale(), setResourceLimit() |
Visual semantics differ from the Gd adapter: blur() maps the radius to a blur sigma, while sharpen and reflection use ImageMagick’s own scales. Switching the factory backend can change the rendered output.
@extends AbstractAdapter<ImagickNative>
Phalcon\Image\Adapter\AbstractAdapterPhalcon\Image\Adapter\Imagick
Uses Imagick · ImagickDraw · ImagickDrawException · ImagickException · ImagickPixel · ImagickPixelException · Phalcon\Image\Enum · Phalcon\Image\Exception · Phalcon\Image\Exceptions\CompositeFailed · Phalcon\Image\Exceptions\ExtensionNotLoaded · Phalcon\Image\Exceptions\ImageLoadFailed · Phalcon\Image\Exceptions\ResizeFailed · Phalcon\Image\Exceptions\ResourceTypeError · Phalcon\Traits\Php\FileTrait
Method Summary
public__construct(string $file,int|null $width = null,int|null $height = null,int $maxPixels = 0)Loads an image from a file, or creates a blank canvas.
public__destruct()Destroys the loaded image to free up resources.
publicAbstractAdaptercreate(int $width,int $height)Creates a blank transparent canvas of the given dimensions, without the
publicAbstractAdapterliquidRescale(int $width,int $height,int $deltaX = 0,int $rigidity = 0)This method scales the images using liquid rescaling method. Only support
publicvoidsetResourceLimit(int $type,int $limit)Sets the limit for a particular resource in megabytes
protectedvoidprocessBackground(int $red,int $green,int $blue,int $opacity)Execute a background.
protectedvoidprocessBlur(int $radius)Blur image
protectedvoidprocessCrop(int $width,int $height,int $offsetX,int $offsetY)Execute a crop.
protectedvoidprocessFlip(int $direction)Execute a flip.
protectedvoidprocessMask(AdapterInterface $mask)Composite one image onto another
protectedvoidprocessPixelate(int $amount)Pixelate image
protectedvoidprocessReflection(int $height,int $opacity,bool $fadeIn)Execute a reflection.
protectedstringprocessRender(string $extension,int $quality)Execute a render.
protectedvoidprocessResize(int $width,int $height)Execute a resize.
protectedvoidprocessRotate(int $degrees)Execute a rotation.
protectedboolprocessSave(string $file,int $quality)Execute a save.
protectedvoidprocessSharpen(int $amount)Execute a sharpen.
protectedvoidprocessText(string $text,mixed $offsetX,mixed $offsetY,int $opacity,int $red,int $green,int $blue,int $size,string|null $fontFile = null)Execute a text
protectedvoidprocessWatermark(AdapterInterface $watermark,int $offsetX,int $offsetY,int $opacity)Add Watermark
Properties
protectedint$version = 0Methods
__construct()
public function __construct(
string $file,
int|null $width = null,
int|null $height = null,
int $maxPixels = 0
);Loads an image from a file, or creates a blank canvas.
When the file exists it is loaded. When the file does not exist and both a width and a height are supplied, a blank transparent canvas is created instead - its realpath, mime and type then describe a PNG canvas rather than the named file. Prefer Imagick::create() for the canvas case; this dual mode is slated for removal in the next major version.
__destruct()
public function __destruct();Destroys the loaded image to free up resources.
create()
public static function create(
int $width,
int $height
): AbstractAdapter;Creates a blank transparent canvas of the given dimensions, without the load-or-create ambiguity of the constructor.
liquidRescale()
public function liquidRescale(
int $width,
int $height,
int $deltaX = 0,
int $rigidity = 0
): AbstractAdapter;This method scales the images using liquid rescaling method. Only support Imagick
setResourceLimit()
public function setResourceLimit(
int $type,
int $limit
): void;Sets the limit for a particular resource in megabytes
@link https://www.php.net/manual/en/imagick.constants.php#imagick.constants.resourcetypes
processBackground()
protected function processBackground(
int $red,
int $green,
int $blue,
int $opacity
): void;Execute a background.
processBlur()
protected function processBlur( int $radius ): void;Blur image
processCrop()
protected function processCrop(
int $width,
int $height,
int $offsetX,
int $offsetY
): void;Execute a crop.
processFlip()
protected function processFlip( int $direction ): void;Execute a flip.
processMask()
protected function processMask( AdapterInterface $mask ): void;Composite one image onto another
processPixelate()
protected function processPixelate( int $amount ): void;Pixelate image
processReflection()
protected function processReflection(
int $height,
int $opacity,
bool $fadeIn
): void;Execute a reflection.
processRender()
protected function processRender(
string $extension,
int $quality
): string;Execute a render.
processResize()
protected function processResize(
int $width,
int $height
): void;Execute a resize.
processRotate()
protected function processRotate( int $degrees ): void;Execute a rotation.
processSave()
protected function processSave(
string $file,
int $quality
): bool;Execute a save.
processSharpen()
protected function processSharpen( int $amount ): void;Execute a sharpen.
processText()
protected function processText(
string $text,
mixed $offsetX,
mixed $offsetY,
int $opacity,
int $red,
int $green,
int $blue,
int $size,
string|null $fontFile = null
): void;Execute a text
processWatermark()
protected function processWatermark(
AdapterInterface $watermark,
int $offsetX,
int $offsetY,
int $opacity
): void;Add Watermark
Image\Enum
ClassSource on GitHubPhalcon\Image\Enum
Constants
intAUTO = 4intHEIGHT = 3intHORIZONTAL = 11intINVERSE = 5intNONE = 1intPRECISE = 6intTENSILE = 7intVERTICAL = 12intWIDTH = 2Image\Exception
ClassSource on GitHubExceptions thrown in Phalcon\Image will use this class
\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\CompositeFailedPhalcon\Image\Exceptions\ExtensionNotLoadedPhalcon\Image\Exceptions\ImageLoadFailedPhalcon\Image\Exceptions\ImageTooLargePhalcon\Image\Exceptions\InvalidColorPhalcon\Image\Exceptions\MissingDimensionsPhalcon\Image\Exceptions\MissingHeightPhalcon\Image\Exceptions\MissingWidthPhalcon\Image\Exceptions\ResizeFailedPhalcon\Image\Exceptions\ResourceTypeErrorPhalcon\Image\Exceptions\TextRenderingFailedPhalcon\Image\Exceptions\UnsupportedImageTypePhalcon\Image\Exceptions\VersionMismatch
Image\Exceptions\CompositeFailed
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\CompositeFailed
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\ExtensionNotLoaded
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\ExtensionNotLoaded
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct( string $extension );Image\Exceptions\ImageLoadFailed
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\ImageLoadFailed
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct( string $file );Image\Exceptions\ImageTooLarge
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\ImageTooLarge
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct(
int $pixels,
int $maxPixels
);Image\Exceptions\InvalidColor
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\InvalidColor
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct( string $color );Image\Exceptions\MissingDimensions
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\MissingDimensions
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\MissingHeight
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\MissingHeight
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\MissingWidth
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\MissingWidth
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\ResizeFailed
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\ResizeFailed
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\ResourceTypeError
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\ResourceTypeError
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\TextRenderingFailed
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\TextRenderingFailed
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct();Image\Exceptions\UnsupportedImageType
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\UnsupportedImageType
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct( string $format = "" );Image\Exceptions\VersionMismatch
ClassSource on GitHub\ExceptionPhalcon\Image\ExceptionPhalcon\Image\Exceptions\VersionMismatch
Uses Phalcon\Image\Exception
Method Summary
Methods
__construct()
public function __construct( string $version );Image\ImageFactory
ClassSource on GitHubFactory to create adapters for image manipulation
Phalcon\Factory\AbstractConfigFactoryPhalcon\Factory\AbstractFactoryPhalcon\Image\ImageFactory
Uses Exception · Phalcon\Config\ConfigInterface · Phalcon\Contracts\Image\ImageTypes · Phalcon\Factory\AbstractFactory · Phalcon\Image\Adapter\AdapterInterface · Phalcon\Image\Adapter\Gd · Phalcon\Image\Adapter\Imagick · Phalcon\Traits\Support\Helper\Arr\GetTrait · Throwable
Method Summary
public__construct(array $services = [])Constructor
publicAdapterInterfaceload(mixed $config)Factory to create an instance from a Config object
publicAdapterInterfacenewInstance(string $name,string $file,int|null $width = null,int|null $height = null)Creates a new instance
protectedstringgetExceptionClass()protectedarraygetServices()Returns the available adapters
Methods
__construct()
public function __construct( array $services = [] );Constructor
load()
public function load( mixed $config ): AdapterInterface;Factory to create an instance from a Config object
newInstance()
public function newInstance(
string $name,
string $file,
int|null $width = null,
int|null $height = null
): AdapterInterface;Creates a new instance
getExceptionClass()
protected function getExceptionClass(): string;getServices()
protected function getServices(): array;Returns the available adapters