5 Replies Latest reply on Nov 9, 2015 4:07 PM by Stephen_A_Marsh

    C2 color profile issues

    Anurag Mendhekar Level 1

      We have a script that automatically places jpgs into illustrator files by updating the file a placed item is linked to.

       

      But any time a JPEG with a "c2" color profile is encountered, Illustrator throws an error "file could not be read", followed by "unable to set placed items's file. Is the file's path correct?". This also seems to affect illustrators JPG handling capability globally in the sense that no other jpgs can now be placed, regardless of color profile. The only solution is the restart illustrator and/or reboot the machine. Our designers have begun to refer to this as the C2 plague.We have to manually get rid of the C2 profile from the jpg before the script can be safely run again.

       

      C2 is a color profile that we have only found in Facebook jpgs, and seems to be something that Facebook may be inserting into its jpgs.

       

      This issue appears in CS5 and CC 2014 and CC 2015 on Mac OSX 10.10 and higher. Has anyone else encountered this problem? Is there a known fix?

       

      Anurag.

        • 1. Re: C2 color profile issues
          Silly-V Adobe Community Professional

          How do you manually get rid of the profile? Would batch-removing via another software such as photoshop prior to running the Illustrator process be a possible solution? Otherwise, something will need to be done about every image during the Illustrator process, such as using photoshop to change the file - if that's a working way to remove this profile.

          • 2. Re: C2 color profile issues
            Stephen_A_Marsh Adobe Community Professional

            Anurag, on CS6 Mac OS 10.9.5 I don’t have a problem placing a Facebook JPEG with an embedded “c2” ICC profile – so I don’t know what the difference is with this unknown script.


            There are numerous work arounds if this is not a script related issue:


            In Adobe Bridge, you can do a “find” command and use the following criteria “Color Profile Equals c2” and “Document Type Equals JPEG file” with a “Match if all criteria are met” result. One could then use a script or action to batch process the files selected in Bridge. I personally prefer the options below, as one does not have to open and resave the JPEG data (lossy), one can hopefully work directly on the ICC metadata without affecting the image data.


            A Mac OS approach could be to use an AppleScript ColorSync to process the JPEG files, either removing the ICC profile or embedding sRGB instead of the offending c2 ICC profile:


            Prepression: ColorSync AppleScript Archive


            These ColorSync AppleScripts can be saved as an application, then all you need to do is drag and drop the c2 embedded files onto the application to process them. Or you could use Apple Automator to monitor a folder (folder action) to automatically apply the script or to add the script to a service so that it is available as a contextual right click on selected files.


            For MS Windows users (or Mac), one could also look into using ExifTool to deal with the ICC meta data.


            • 3. Re: C2 color profile issues
              Anurag Mendhekar Level 1

              We get rid of the profile on all the images in batch using something like ImageOptim or exiftool on the command line. Doing it in photoshop is far more painstaking.

               

              Doing a pre-screen for the C2 is really the only option that remains, but we have a complex image import pipeline (before it gets to the illustrator step) and adding a step to it has met with some resistance.  Doing a pre-screen in illustrator using javascript may be an option, but we'll have to do it using exiftool or imageoptim since opening the image in illustrator is enough to cause the issue.

               

              @stephen_a_marsh : It is interesting that you are able to open it in CS6 (which I have not tried yet). I also don't know if facebook has used different versions of c2 over time, but any time we encounter this problem, it can be directly traced to the c2 profile.

               

              Since we don't really understand the root cause that causes AI to fail on C2, we can't really fix the bug at source and having to explicitly edit color profiles out of images seems like a clumsy solution. I was hoping someone on the forums (particularly someone at Adobe) had some thought on it.

               

              A.

              • 4. Re: C2 color profile issues
                Silly-V Adobe Community Professional

                Anurag, perhaps you can write an external script which will execute your external processing utilities. If you can trigger an external script from your .jsx to run your command-line tool on a target file, it would be what you need.

                • 5. Re: C2 color profile issues
                  Stephen_A_Marsh Adobe Community Professional

                  You can send me a PM and I can look offlist at one of your images with an embedded c2 profile in CS6, however that will not really resolve anything at your end if you use CS5 and CC14/15.

                   

                  I can place a JPEG with c2 profile or place say an sRGB JPEG and then relink to a C2 profile without issue, however this is using the GUI – your script may be doing something else. Do you get the same issue when manually placing or updating – or only when using your unknown script?

                   

                  Have you looked into colour settings, perhaps turning off RGB profiles in colour management policies to see if this has an effect?

                   

                  If you don’t have a colour server or other process normalising the colour content upstream, then ColorSync AppleScripts and Automator Folder Actions are a great entry level solution. Either at the server level or local workstation level. The beauty of using a ColorSync AppleScript and a Folder Action (watched/monitored folder) is that the Mac OS will remove or assign a different profile to the image automatically when the image is in the folder, without operator intervention. By the time the operator goes to place the JPEG, the problem should not be there.