ImageService
class ImageService (View source)
An image service that acts as abstraction for the Imagine library
Properties
protected ImagineInterface | $imagineService | ||
protected ResourceManager | $resourceManager | ||
protected Environment | $environment | ||
protected AssetRepository | $assetRepository | ||
protected VariableFrontend | $imageSizeCache | ||
protected array | $settings | ||
static protected string[] | $allowedFormats |
Methods
void
injectSettings(array $settings)
No description
array
processImage(PersistentResource $originalResource, array $adjustments, string $format = null)
No description
array
getOptionsMergedWithDefaults(array $additionalOptions = [])
No description
array
getImageSize(PersistentResource $resource)
Get the size of a Flow PersistentResource that contains an image file.
ImageInterface
applyAdjustments(ImageInterface $image, array $adjustments, bool $adjustmentsApplied)
No description
bool
isAnimatedGif(string $image)
Detects whether the given GIF image data contains more than one frame
Details
void
injectSettings(array $settings)
No description
array
processImage(PersistentResource $originalResource, array $adjustments, string $format = null)
No description
protected array
getOptionsMergedWithDefaults(array $additionalOptions = [])
No description
array
getImageSize(PersistentResource $resource)
Get the size of a Flow PersistentResource that contains an image file.
protected ImageInterface
applyAdjustments(ImageInterface $image, array $adjustments, bool $adjustmentsApplied)
No description
protected bool
isAnimatedGif(string $image)
Detects whether the given GIF image data contains more than one frame