Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Ah, The Joys Of Pre-Multiplied Alpha...

Reply
Thread Tools

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

 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      10-16-2010
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.
 
Reply With Quote
 
 
 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      10-16-2010
In message <i9bvin$6m8$(E-Mail Removed)>, 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
the joys of png windandwaves HTML 2 09-30-2005 08:46 AM
The joys of functions and arrays Jeremy Stringer VHDL 2 04-07-2005 11:10 PM
joys of a new mouse Roedy Green Java 0 04-20-2004 03:26 AM
The joys of Python Volker Gietz Python 0 04-02-2004 08:32 AM
The joys of Point 'n Shoot type Digital Cameras James Digital Photography 8 02-02-2004 05:44 PM



Advertisments