5

We have the problem, that one image in the catalog is shown negatively in Magento below the gallery:

Screenshot

Original

Small

I tried to reproduce with n98-magerun2 dev:console

$i = $di->create('\Magento\Framework\Image',
  ['fileName' => 'original.jpg']);
$i->open();
$i->resize(90,90);
$i->save('small-repro.jpg');

Which I cant.

While I can reproduce it by

rm product/cache/.... $ rm small.jpg 

and reloading the category page -> it's shown wrong again.

The image also shoes like this when downloading or showing in different browsers, so it seems to be a problem within the server / Magento.

  1. Did anybody see this before?
  2. How can I dig deeper into it?
  • Did you find the solution? – Jaimin Parikh May 16 at 13:36
  • Do you have the same problem? Actually I did not find a real solution but deleted that particular image – Alex May 17 at 16:21
7

This could be down to the image being in the CMYK colour space, Imagick can have issues when working with these images as it is unable to convert to RGB properly.

You can either upload a preconverted image, or trying patching in a way for Magento to deal with this issue with the use of setImageColourSpace and a nice little if around $image->getImageColorspace() == Imagick::COLORSPACE_CMYK to set the correct ICC profile.

  • One thing remains strange: Why can I not reproduce it via the simple n98-magerun commands – Alex Jan 30 at 12:15
  • in which file I do this change? – Satish Rana May 16 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.