[Webkit-unassigned] [Bug 28345] [GTK] BitmapImage::getGdkPixbuf does not handle alpha channels properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 17 17:17:04 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28345
Eric Seidel <eric at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34910|review? |review-
Flag| |
--- Comment #3 from Eric Seidel <eric at webkit.org> 2009-08-17 17:17:04 PDT ---
(From update of attachment 34910)
rowstride should probably be rowStride according to webkit style.
Are you sure there aren't gtk functions which abstract this?
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ guchar alpha = source[3];
+ dest[0] = alpha ? ((source[2] * 255) / alpha) : 0;
+ dest[1] = alpha ? ((source[1] * 255) / alpha) : 0;
+ dest[2] = alpha ? ((source[0] * 255) / alpha) : 0;
+ dest[3] = alpha;
+#else
Seems silly to make every program check those ifdefs.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list