private function toRGB(ImageInterface $image) { if ($image->palette()->name() == 'cmyk') { $image->usePalette(new RGB()); } return $image; }