зеркало из https://github.com/mono/mail-archives.git
100 строки
4.1 KiB
HTML
100 строки
4.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] [Mono-winforms-list] DrawImage alpha blend broken in libgdiplus
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMono-winforms-list%5D%20DrawImage%20alpha%20blend%20broken%20in%0A%09libgdiplus&In-Reply-To=49DCC9FB.8070007%40yessoftware.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="002204.html">
|
|
<LINK REL="Next" HREF="002206.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] [Mono-winforms-list] DrawImage alpha blend broken in libgdiplus</H1>
|
|
<B>Sebastien Pouliot</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMono-winforms-list%5D%20DrawImage%20alpha%20blend%20broken%20in%0A%09libgdiplus&In-Reply-To=49DCC9FB.8070007%40yessoftware.com"
|
|
TITLE="[Mono-osx] [Mono-winforms-list] DrawImage alpha blend broken in libgdiplus">sebastien.pouliot at gmail.com
|
|
</A><BR>
|
|
<I>Wed Apr 8 13:33:43 EDT 2009</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="002204.html">[Mono-osx] DrawImage alpha blend broken in libgdiplus
|
|
</A></li>
|
|
<LI>Next message: <A HREF="002206.html">[Mono-osx] [Mono-winforms-list] DrawImage alpha blend broken in libgdiplus
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#2205">[ date ]</a>
|
|
<a href="thread.html#2205">[ thread ]</a>
|
|
<a href="subject.html#2205">[ subject ]</a>
|
|
<a href="author.html#2205">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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:
|
|
><i> Alex Shulgin wrote:
|
|
</I>><i> > Hi,
|
|
</I>><i> >
|
|
</I>><i> > I believe that alpha blending is broken in libgdiplus.
|
|
</I>><i>
|
|
</I>><i> I've located the problem. It is due to the inconsistent handling of
|
|
</I>><i> PixelFormat32bppPArgb (premultiplied alpha) in libgdiplus.
|
|
</I>><i>
|
|
</I>><i> In the attached patch I've added the check on PArgb to DrawImageRect in
|
|
</I>><i> analogy with texturebrush.c and fixed pngcodec.c to set pixel format to
|
|
</I>><i> PArgb if premultiplication was done.
|
|
</I>><i>
|
|
</I>><i> This fixes my demo program and there's no visible regressions in a
|
|
</I>><i> fairly complex application which originally revealed the problem.
|
|
</I>><i>
|
|
</I>><i> If the feeling is such that this is appropriate patch, I'd add the same
|
|
</I>><i> handling for places like this (there's few).
|
|
</I>><i>
|
|
</I>><i> --
|
|
</I>><i> Regards,
|
|
</I>><i> Alex
|
|
</I>><i>
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Mono-winforms-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-winforms-list at lists.ximian.com</A>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">http://lists.ximian.com/mailman/listinfo/mono-winforms-list</A>
|
|
</I>
|
|
</PRE>
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="002204.html">[Mono-osx] DrawImage alpha blend broken in libgdiplus
|
|
</A></li>
|
|
<LI>Next message: <A HREF="002206.html">[Mono-osx] [Mono-winforms-list] DrawImage alpha blend broken in libgdiplus
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#2205">[ date ]</a>
|
|
<a href="thread.html#2205">[ thread ]</a>
|
|
<a href="subject.html#2205">[ subject ]</a>
|
|
<a href="author.html#2205">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
|
|
mailing list</a><br>
|
|
</body></html>
|