7 Replies Latest reply on Oct 25, 2013 5:10 AM by JR2010

    How to save a png with a straight or fat alpha?

    JR2010 Level 1

      Long story short, work in broadcast and a new piece of gear prefers png files.  I know how to save png's with a transparency, that's not the problem.  What I don't know how to do or if it's possible is to save them with a straight or fat alpha.  Right now we feather or extend the edges out past the alpha of say a logo and save it as a tif, psd or .tga.  That way once it's keyed over video or whatever, the edges look good, no black bad edging.... this makes sense, probably not explaining it very well.   But switching to png files I have no idea how to make a straight or fat alpha since it sees transparency.  I mean if I feathered out the edges, a png will see that correct, since there's no alpha??

       

      I hope this makes sense ?

        • 1. Re: How to save a png with a straight or fat alpha?
          Level 7

          PNG always saves with straight color - that's how the PNG spec defines it.

           

          It sounds a bit like you might be loading the PNGs into an application that treats the transparency channel incorrectly.

          Also, why are you mentioning alpha channels?  PNG only supports transparency, not arbitrary alpha channels.

          • 2. Re: How to save a png with a straight or fat alpha?
            JR2010 Level 1

            Chris, this is probably the answer I seek "PNG always saves with straight color - that's how the PNG spec defines it." 

             

            I admit my explanation was a bit weak and I understand PNG only supports transparency, which is not an alpha,  and the apps aren't treating them wrong....I just couldn't formulate an intelligent question and explain it, my bad.

             

            After thinking about it I don't think using a PNG will work. RIght now for broadcast gear/applications if we don't fill the transparent and semi-transparent areas of an image with the colored part of the image, we usually end up getting a dirty key/matte or a lot of fringing.  So when using a .tif or .tga that reads an actuall alpha, we can fix the issue by doing what I described.  In fact we use a quick little plugin from flaming Pear called "Solidifty" to speed up the process http://www.flamingpear.com/download.html .  With that said, I know we can't do the same steps with a png because it only sees transparency, but I guess I was wondering if there was a work-around or a trick to fix that issue.  I could be wong, but doesn't a png save with white ?

             

            But again, as I thought about it, I think i'm asking for something it's not meant to do, but I thought I'd ask anyway.

             

            Thanks Chris, does this make more sense or more confusing?  The bottom-line is I don't think it will work.

            • 3. Re: How to save a png with a straight or fat alpha?
              Level 7

              >> if we don't fill the transparent and semi-transparent areas of an image with the colored part of the image, we usually end up getting a dirty key/matte or a lot of fringing.

               

              That means that your other software/hardware is not reading/interpreting the PNG file correctly.

               

              PNG saves with whatever is in the pixels in the transparent area - because they're supposed to be transparent and not seen.

              If you see artifacts in the transparent areas, then something is wrong with the software displaying the PNG, because 100% transparent should not be visible at all.

               

               

              It almost sounds like someone failed to read documentation/specifications and is trying to treat PNG as a premultiplied format.

              • 4. Re: How to save a png with a straight or fat alpha?
                JR2010 Level 1

                It almost sounds like someone failed to read documentation/specifications and is trying to treat PNG as a premultiplied format.

                 

                Possibly.. don't know.  I didn't buy the new gear, all i know is i have to provide graphics for it and yes this piece of gear has a lot of "undocumented features".  I just don't use png very offen, which is why i came here to ask in the first place.  And yes maybe the gear is reading and/or treating png files incorrectly.  All i know is I don't like how they look and wondered if there were any tricks to yes treat is as a  premultiplied format more or less.... but i know now that answer is no.

                 

                Thanks for the help, even if i now feel like an idiot for asking.

                • 5. Re: How to save a png with a straight or fat alpha?
                  Level 7

                  You shouldn't feel bad - file format details and compositing details aren't something that everyone would know (and apparently some video companies don't know :-).

                   

                  That new piece of gear wouldn't happpen to be a titler by a well known company, would it?

                  (they kinda have a history of messing up file format implementation)

                  • 6. Re: How to save a png with a straight or fat alpha?
                    Herbert2001 Level 4

                    If you really require "premultiplied png" images, it is quite easy to DIY those in Photoshop:

                     

                    1) import/open a png with normal transparency

                    2) duplicate the original layer

                    3) create a new fill layer and fill with either white or black, depending whether you need to premultiply with black or white

                        move the duplicated layer over the fill layer in the layer stack

                    4) then merge the duplicated layer with the fill layer

                    5) <ctrl>click the original to load the transparency as a selection

                    6) select the merged layer, and create a layer mask based on that selection.

                    • 7. Re: How to save a png with a straight or fat alpha?
                      JR2010 Level 1

                      That new piece of gear wouldn't happpen to be a titler by a well known company, would it?

                       

                       

                      Mr. Nail, meet Mr. Head.