Файл: vendor/intervention/image/src/Drivers/Gd/Modifiers/ColorspaceModifier.php
Строк: 44
<?php
declare(strict_types=1);
namespace InterventionImageDriversGdModifiers;
use InterventionImageColorsRgbColorspace as RgbColorspace;
use InterventionImageExceptionsNotSupportedException;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSpecializedInterface;
use InterventionImageModifiersColorspaceModifier as GenericColorspaceModifier;
class ColorspaceModifier extends GenericColorspaceModifier implements SpecializedInterface
{
/**
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws NotSupportedException
*/
public function apply(ImageInterface $image): ImageInterface
{
if (!$this->targetColorspace() instanceof RgbColorspace) {
throw new NotSupportedException(
'Only RGB colorspace is supported by GD driver',
);
}
return $image;
}
}