[webkit-reviews] review denied: [Bug 28345] [GTK] BitmapImage::getGdkPixbuf does not handle alpha channels properly : [Attachment 34910] Fix conversion
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 17 17:17:03 PDT 2009
Eric Seidel <eric at webkit.org> has denied Martin Robinson
<martin.james.robinson at gmail.com>'s request for review:
Bug 28345: [GTK] BitmapImage::getGdkPixbuf does not handle alpha channels
properly
https://bugs.webkit.org/show_bug.cgi?id=28345
Attachment 34910: Fix conversion
https://bugs.webkit.org/attachment.cgi?id=34910&action=review
------- Additional Comments from Eric Seidel <eric at webkit.org>
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.
More information about the webkit-reviews
mailing list