6 Replies Latest reply on Oct 22, 2017 1:39 PM by D Fosse

    PNG support for colour profiles incomplete/unpredictable in CC 2018

    witkacy Level 1

      Hello,

       

      The new Export As... Embed profile checkbox doesn’t work properly with PNG8 files (“Smaller Files”). Mac and Windows edition of CC 2018 behaves differently when it comes to recognising sRGB chunk in PNG files (incl. those saved from Photoshop). The new CC 2018 PNG support through Save As.. has lost an ability to embed colour profiles (it works correctly in CC 2017).

       

      For a detailed report, please see: PNG8 colour support broken · Issue #392 · adobe-photoshop/generator-core · GitHub

       

      Regards

      m.

        • 1. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
          D Fosse Adobe Community Professional & MVP

          PNG-8 is indexed color, which doesn't support icc profiles.

           

          Export As PNG-24, as well as Save As PNG, both embed the profile correctly. Just tested in Win 10.

           

          In other words, there's nothing wrong. Everything is as expected.

          • 2. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
            witkacy Level 1

            Hi,

             

            Thanks for the answer.

            PNG-8 is indexed color, which doesn't support icc profiles.

            Colour profiles are supported for all PNG types (indexed included): PNG Specification: Chunk Specifications. As is sRGB chunk. Plenty of indexed PNGs in the wild with both and support for it in other applications. Even if Adobe would choose not to follow PNG spec and wide practice and add to confused colour all over the web by not supporting iCCP and sRGB chunks for indexed PNGs, they would need to disable checkboxes that currently aren’t working as advertised and are confusing.

             

            Save As PNG (...) embed the profile correctly

            Apologies. You’re right, I was mislead by unchecked AND greyed out Embed profile checkbox in Save As for images in sRGB. Profiles are correctly saved provided they are NOT sRGB. However, if the image is in sRGB, Photoshop CC2018 Win doesn’t write sRGB  or iCCP chunks (Export As PNG-24 saves iCCP, it could produce smaller files by using sRGB chunk, but at least it doesn’t produce incorrect files).

             

            In other words, there's nothing wrong. Everything is as expected.

             

            Not my experience, unfortunately. Also Mac and Windows versions are incompatible now (in CC 2018) when it comes to recognising sRGB chunks in files (incl. those they wrote themselves), amazingly – both are wrong (Win doesn’t recognise sRGB chunks, Mac sees them in PNGs without sRGB chunks).

             

            Plenty to improve, I would say.

             

            Coming back to colour profiles in indexed PNGs. I’ve used the spec argument above just to reinforce my point. But, to be honest, I don’t care for the spec as such. Imagine an indexed PNG with just one, red colour. Wouldn’t you want to know if that red is in sRGB or ProPhotoRGB?!

             

            Regards

            m.

            • 3. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
              D Fosse Adobe Community Professional & MVP

              Colour profiles are supported for all PNG types (indexed included)

               

              Well, maybe, I don't know. But if you're concerned with color accuracy, you wouldn't use indexed color in the first place. And vice versa.

               

              Imagine an indexed PNG with just one, red colour. Wouldn’t you want to know if that red is in sRGB or ProPhotoRGB?!

               

              Again, maybe. Same argument as hex color: an indexed PNG can be safely assumed to be intended for an sRGB environment.

              • 4. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
                Jeff Arola Adobe Community Professional

                In photoshop cc 2018 have you tried File>Export>Save for Web?

                • 5. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
                  witkacy Level 1

                  Hi,

                   

                  if you're concerned with color accuracy, you wouldn't use indexed color in the first place

                  I respectfully disagree. PNG8 is still the only (sane) way to support images with transparency in some popular browsers (it doesn’t help that Photoshop doesn’t natively support JXR, WebP and only partly supports JP2). Why these images have to suffer unpredictable saturation shifts by being misinterpreted as being in display device’s space because of the lack of colour information?

                   

                  an indexed PNG can be safely assumed to be intended for an sRGB environment

                  Yeah, that’s what the web specs say for years (about untagged imagery in general). Unfortunately browsers (and other applications/OSes) do not correctly assume sRGB for untagged images (situation is changing for the better as we speak, but still). Why would Photoshop want to add to that confusion? Again: even if that’s a (wrong) concious decision, UI suggests differently and is misleading.

                   

                  In photoshop cc 2018 have you tried File>Export>Save for Web?

                  Thanks, Jeff. Save for Web has it’s own set quirks when it comes to colour profiles :-). But, crucially, its support for PNG8 is miserable compared to Export As... (only 1-bit transparency allowed).

                   

                  I just thought it may be a good time to get engineer’s attention, which I’ve tried using different channels for a while now, as the PNG code was definitely touched in CC 2018 and better support for PNG is being advertised ;-).

                   

                  Maybe it would be prudent to make Photoshop correctly recognise sRGB PNG chunks and then always use those when writing PNGs in sRGB colour space instead of unnecessarily weighty iCCP chunks, too (2,6KB extra)? For the files to be smaller, but also to avoid long-standing issues like Original sRGB profile is not correctly recognised as such by IM/libpng (culprit: pngcrush code to deal with it?). But here, I’m a newbie and this is way above my understanding...

                   

                  Regards

                  m.

                  1 person found this helpful
                  • 6. Re: PNG support for colour profiles incomplete/unpredictable in CC 2018
                    D Fosse Adobe Community Professional & MVP

                    Unfortunately browsers (and other applications/OSes) do not correctly assume sRGB for untagged images\

                    Firefox has done that for many years (with the mode 1 setting), and I hear Chrome and Opera do it too now. On Mac, Safari has to do it, ever since Apple started fitting the iMacs and MBPs with wide gamut displays.

                     

                    So that basically just leaves Edge/IE - but Microsoft's browsers have always been known for their lacking color management support. Nothing new there.

                     

                    The OS isn't supposed to assume anything. This is called by the application, not the OS - it's just supposed to make the profiles available when the application requests it.