Page 2 of 3
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-14T02:00:03-07:00
by snibgo
The listing shows that test.jpg is RGB but contains
two profiles:
Code: Select all
icc:copyright: Copyright 2000 Adobe Systems Incorporated
icc:description: Adobe RGB (1998)
icc:manufacturer: Adobe RGB (1998)
icc:model: Adobe RGB (1998)
:
photoshop:ColorMode: 4
photoshop:ICCProfile: Coated FOGRA39 (ISO 12647-2:2004)
I suppose ImageMagick has ignored this extra Photoshop profile.
After doing the conversion, you can remove both profiles, then insert the correct one:
Code: Select all
convert -quiet Daim.psd -flatten -profile CoatedFOGRA39.icc -profile AdobeRGB1998.icc -strip -profile AdobeRGB1998.icc t2.jpg
The result, t2.jpg, contains only AdobeRGB1998, looks the same as your test.jpg, and "compare" reports a zero difference.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-17T23:25:50-07:00
by eduardo.melgar
Hi,
The workaround will definitely remove the incorrect ICC profile (adding a new ICC after the -strip option). Unfortunately all other metadata will be removed as well (like clipping path).
A more precise workaround could be removing only the XMP metadata (with +profile "xmp").
Removing entire sets of metadata is not a good idea anyway. I think Image Magick should address this issue: it is obvious that the ICC profiles are not in sync, even they are in different namespaces.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-18T00:03:25-07:00
by snibgo
eduardo.melgar wrote:A more precise workaround could be removing only the XMP metadata (with +profile "xmp").
True, it would be more precise, but sadly doesn't remove the PS profile.
Code: Select all
convert daim.psd[0] -profile CoatedFOGRA39.icc -profile AdobeRGB1998.icc +profile "xmp" t2.jpg
identify -verbose t2.jpg
icc:copyright: Copyright 2000 Adobe Systems Incorporated
icc:description: Adobe RGB (1998)
icc:manufacturer: Adobe RGB (1998)
icc:model: Adobe RGB (1998)
illustrator:StartupProfile: Print
illustrator:Type: Document
: :
photoshop:ColorMode: 4
photoshop:ICCProfile: Coated FOGRA39 (ISO 12647-2:2004)
+profile "*" should remove both profiles, and it does, but sadly it also removes the clipping path. (I don't think it should, so that looks like a bug. IM 6.8.9-0 on Windows 8.1.)
The most reliable solution might be to do the conversion in IM, then use exiftool to remove any Photoshop profile.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-25T08:01:36-07:00
by eduardo.melgar
Hi again,
It is not enough removing the two properties in Exiftool to create a (photoshop)readable JPG.
I will use the command +profile "8bim,xmp" by now, even that command also removes the clipping path.
Do you know if this issue will be marked (as I understand, it should be) as BUG and eventually when we can expect to have it solved?
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-26T14:53:20-07:00
by dlemstra
Can you try to open this file in Photoshop:
https://www.dropbox.com/s/7yi5z2ymve07xrf/Daim.jpg? It is only missing the xmp profile. I have added a patch that will update the 8bim profile when the xmp profile is removed or changed. I only used +profile xmp.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-27T06:32:34-07:00
by eduardo.melgar
Hi,
Unfortunately you patch don't resolve the issue I am reporting: after downloading from
https://www.dropbox.com/s/7yi5z2ymve07xrf/Daim.jpg I try to open it in photoshop, but I still get the "screenshot.png" warning from
https://drive.google.com/folderview?id= ... sp=sharing
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-27T08:52:48-07:00
by dlemstra
Can you try again? I have now updated the 8bim profile with the new icc profile.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-27T13:45:32-07:00
by eduardo.melgar
Hi,
Photoshop accepts now the image without complaining. Is your solution a patch for IM or I should wait for the next version?
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-04-27T13:57:56-07:00
by dlemstra
If you are building IM from source you could should grab the latest version of profile.c from our svn repository. Otherwise you will have to wait for the next version that includes this change. The image was created with the following command:
Code: Select all
convert -quiet Daim.psd[0] -profile CoatedFOGRA39.icc -profile AdobeRGB1998.icc Daim.jpg
You don't need to use
Daim.psd -flatten you can use
Daim.psd[0]. The latest version of ImageMagick will automatically create the 'merged'/'flattened' image if the PSD file does not contain one.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-10-03T08:19:32-07:00
by jdo
[17:01:56] kataross: Hi,
We are facing the exact same issue, even with the latest version of ImageMagick.
The Image is detected as a grayscale (not RGB) and photoshop is complaining while opening the converted one.
We tried all the command you suggested but none of them seem to work (the 8bim is still corrupted).
Here is a sample file :
http://we.tl/ujC89jgWGX
Thanks for your help
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-10-03T12:35:31-07:00
by glennrp
Your image seems to have at least four copies of the sRGB profile in it. One in the ICC profile, one in the Adobe-XMP profile, and at least two in the 8bim profile.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-10-06T00:34:31-07:00
by jdo
Is it a problem for ImageMagick?
The original image is exported using photoshop.
Is it possible to force rgb rendering and avoid the error when opening in photoshop without losing the clipping path?
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-11-07T07:14:04-07:00
by jdo
We have fixed color issues by updating picutres library (jpeg,png ...).
But we can't find a way to fix error whil opening in photoshop.
Do you have any idea to fix the warning?
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-12-05T13:06:49-07:00
by CatBurgers
I'm having a similar issue with this file:
http://3fc68be784075022e210-30c1eab61c3 ... ag01BW.jpg
Using the command:
Code: Select all
convert file.jpg -auto-orient output.jpg
I get the aforementioned 'The embedded ICC profile cannot...' error in Photoshop CS 6 when trying to open the output file. I'm using the latest IM static build for windows.
Using '-type TrueColor' removes the error message for this particular image, however I need a solution that can be automated and will work for all color profiles.
Interestingly, this file:
http://3fc68be784075022e210-30c1eab61c3 ... ng-171.jpg gives the same error when opening in Photoshop, however after having been processed by imagemagick, the error message doesn't appear for the output file.
Re: Embedded ICC profile is invalid in converted JPEG
Posted: 2014-12-05T13:23:30-07:00
by glennrp
The American flag image is a grayscale JPEG. It contains at least two sRGB profiles. Grayscale images are only allowed to have grayscale ICC profiles.