Ah, The Joys Of Pre-Multiplied Alpha...

Discussion in 'NZ Computing' started by Lawrence D'Oliveiro, Oct 16, 2010.

  1. I knew premultiplied alpha was considered a good idea, but I wasn’t sure
    what graphics APIs supported it.

    Turns out Cairo does, but GTK/GDK doesn’t. And suddenly, a whole lot of
    weird behaviour I was getting with non-opaque pixels starts to make sense.
    And I had put in code to un-premultiply alpha before showing you a colour in
    the GTK colour chooser, and then multiply it back again after accepting your
    colour choice; then I thought I was being too smart, and took out this code.
    And it turns out I was right to put it in in the first place.

    As for PNG, officially it seems it doesn’t do premultiplied alpha, but
    everybody uses it as though it does.
    Lawrence D'Oliveiro, Oct 16, 2010
    #1
    1. Advertising

  2. In message <i9bvin$6m8$>, Lawrence D'Oliveiro wrote:

    > As for PNG, officially it seems it doesn’t do premultiplied alpha, but
    > everybody uses it as though it does.


    Checked this using Gimp as my reference. PNG does not want premultiplied
    alpha.
    Lawrence D'Oliveiro, Oct 17, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James

    The joys of Point 'n Shoot type Digital Cameras

    James, Feb 1, 2004, in forum: Digital Photography
    Replies:
    8
    Views:
    386
    John P. McCormack
    Feb 2, 2004
  2. Will Dockery

    Re: OT: Graphic poetry begins (pre-hotspot, pre-poetry)

    Will Dockery, May 31, 2005, in forum: Digital Photography
    Replies:
    4
    Views:
    333
    Will Dockery
    Jun 1, 2005
  3. Will Dockery

    OT: Graphic poetry begins (pre-hotspot, pre-poetry)

    Will Dockery, Jun 1, 2005, in forum: Digital Photography
    Replies:
    1
    Views:
    319
    Citizen_Cain
    Jun 1, 2005
  4. Will Dockery

    OT: Graphic poetry begins (pre-hotspot, pre-poetry)

    Will Dockery, Jun 1, 2005, in forum: Digital Photography
    Replies:
    1
    Views:
    441
    Tom Bishop
    Jun 1, 2005
  5. thingy
    Replies:
    20
    Views:
    643
    ~misfit~
    Oct 27, 2007
Loading...

Share This Page