Re: [AD] 5.0 and 5.1 branches |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 16 Nov 2010, at 18:43 , Trent Gamblin wrote:
> Apparently it may not even be possible without using libpng.
>
> From: http://www.cocoabuilder.com/archive/cocoa/184516-obtaining-unpremultiplied-bitmap-from-png-file.html
>
> "kCGImageAlphaLast is implemented and fully supported for creating a
> CGImageRef. What is not implemented is creating a bitmap context (via
> CGBitmapContextCreate) that does not use pre-multiplied alpha. The
> distinction is subtle, but practically it means that you can create
> an image that does not used pre-multiplied alpha, but in the current
> API you cannot obtain the pixel data from that image into your own
> buffer without getting it pre-multiplied."
That's rather stupid.
Of course it's easy to divide out the alpha value (with some loss of precision, maybe) if we really feel that we should do that.
But it seems a lot of hassle to avoid something that we're going to add later anyway.
Since supporting pre-multiplied alpha properly is, on OS X at least, really a bugfix, I say we can get it into RC2 / release. Only thing is someone should do the work and commit before then.
Evert