ImageMagick convert - color profile operates on another colorspace icc

Salut,

Am o problema la un resize cu ImageMagick, pe care nu am reusit s-o rezolv nici dupa ore si ore de cautari.
Pentru o anumita imagine (una am descoperit pana acum), conversia returneaza eroarea:
“convert.im6: color profile operates on another colorspace `icc’ @ error/profile.c/ProfileImage/776”.

Comanda executata (prin php):
convert ‘path/to-file.jpg[0]’ -profile ‘sRGB_IEC61966-2-1_black_scaled.icc’ -resize ‘300x200^’ -gravity center -extent ‘300x200’ -flatten +repage -strip -density 72x72 -quality 75 jpg:‘resized_file_name’

A mai intalnit cineva problema asta?

Multumesc!

Nu cumva este CMYK imaginea?
Poti detecta lucrul asta: http://techfreakindia.blogspot.ro/2010/09/how-to-identify-cmyk-jpg-and-rgb-jpg.html

Poate trebuie sa o convertesti in RGB mai intai daca ai specificat -profile ‘sRGB_IEC61966-2-1_black_scaled.icc’.

Imaginea este RGB.

Se spune ca e un bug ce ar fi fost rezolvat in versiunea 6.8.9 a ImageMagick, desi unii tot l-au mai intalnit.

Dar exista si o solutie:

convert behaves different if the source image has an embedded profile or not. That is very annoying. If it does not have one, you need to provide TWO -profile parameters (a source and a target profile), or no conversion will happen, and usually the source file will not have a profile if it is a self-made image. I therefore recommend to remove an maybe existing profiles in the image using +profile “*” when you are sure it is a RGB file, so that all files are handled uniformly, and then 2 profiles should be specidifed using “-profile”

(de aici graphics - How do I make sure images are CMYK? - TeX - LaTeX Stack Exchange)

Pe scurt, la comanda executata se adauga: +profile ‘*’. La un prim test functioneaza, dar urmeaza sa verific imagini cu alt profil.

2 Likes