Hello Alex, The patch looks good. However this kind of fix has been known to cause regression in the past.
Could you supply unit tests that ensure that the image can be saved and reloaded correctly ? (modifying your previous sample code should be easy). With this (and if all existing tests pass successfully) I'll be able to commit your patch. Thanks! Sebastien On Wed, 2009-04-08 at 18:59 +0300, Alex Shulgin wrote: > Alex Shulgin wrote: > > Hi, > > > > I believe that alpha blending is broken in libgdiplus. > > I've located the problem. It is due to the inconsistent handling of > PixelFormat32bppPArgb (premultiplied alpha) in libgdiplus. > > In the attached patch I've added the check on PArgb to DrawImageRect in > analogy with texturebrush.c and fixed pngcodec.c to set pixel format to > PArgb if premultiplication was done. > > This fixes my demo program and there's no visible regressions in a > fairly complex application which originally revealed the problem. > > If the feeling is such that this is appropriate patch, I'd add the same > handling for places like this (there's few). > > -- > Regards, > Alex > > _______________________________________________ > Mono-winforms-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-winforms-list _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
