Image
App\Shared\Services\Image
Method | Description | Type | Parameters | Return |
---|---|---|---|---|
resize | Resize image function Example Usage: $size = getimagesize('staticassetsimgavatarpng'); $this->resize($size[0], $size[1], 80); |
public static |
int $width Width of the image int $height Height of the image int $target Size of image |
|
manipulate | Manipulate image(s) with an expressive API type string $image_source The source of the original image type string $image_destination The destination of the new image type bool $image_sepia Whether to add sepia filter type int $image_blur Blue the image type bool $image_original Whether to returnsave new image to original size type int $image_width Width of new image in pixels type int $image_height Height of new image in pixels type string $image_format Whether to show content in search type int $image_quality Quality percent Only applies for jpeg type int $image_brightness The content's featured image type int $image_contrast Adjusts the contrast of image type int $image_gamma Adjusts the gamma of image type string $image_background Sets the background of transparent images type string $image_fit Fits the image with the given width and height type string $image_crop Cropped to the given width and height type array $image_border Adds border to image type string $image_orientation Rotate the image type int $image_pixelate Pixelates the image type bool $image_greyscale Converts image to greyscale type int $image_sharpen Sharpens the image type array $image_watermark Adds a watermark to image throws ContainerExceptionInterface throws NotFoundExceptionInterface throws Exception throws ReflectionException throws CouldNotLoadImage |
public | array $params An array of parameters for image manipulation | bool Image |