frmagick: ensure correct colorspace

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/579/head
Varun Patil 2023-04-16 10:13:13 -07:00
parent 2f62a4e1c2
commit bc704e8221
1 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,11 @@ class FileRobotMagick
public function apply()
{
// Ensure the image is in the correct colorspace
if (\Imagick::COLORSPACE_SRGB !== $this->image->getColorspace()) {
$this->image->transformImageColorspace(\Imagick::COLORSPACE_SRGB);
}
$this->applyCrop();
$this->applyFlipRotation();
$this->applyResize();