mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 16:50:07 +02:00
Save all images in SRGB color space with Imagick driver
This commit is contained in:
@@ -30,6 +30,10 @@ class JpegEncoder extends AbstractEncoder implements EncoderInterface
|
|||||||
$imagick->setCompressionQuality($this->quality);
|
$imagick->setCompressionQuality($this->quality);
|
||||||
$imagick->setImageCompressionQuality($this->quality);
|
$imagick->setImageCompressionQuality($this->quality);
|
||||||
|
|
||||||
|
if ($imagick->getImageColorspace() != Imagick::COLORSPACE_SRGB) {
|
||||||
|
$imagick->transformImageColorspace(Imagick::COLORSPACE_SRGB);
|
||||||
|
}
|
||||||
|
|
||||||
return new EncodedImage($imagick->getImagesBlob(), 'image/jpeg');
|
return new EncodedImage($imagick->getImagesBlob(), 'image/jpeg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user