From 0ffcb052285b1efdf4057eeb4fb82f8ef411c88a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 31 Jul 2008 11:32:10 +0000 Subject: [PATCH] 2008-07-31 Emmanuele Bassi * clutter-gtk/gtk-clutter-util.c: (gtk_clutter_texture_new_from_pixbuf), (gtk_clutter_texture_set_from_pixbuf): Check if the pixbuf has an alpha before setting the BPP. --- ChangeLog | 7 +++++++ clutter-gtk/gtk-clutter-util.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4152b6e..98e1801 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-31 Emmanuele Bassi + + * clutter-gtk/gtk-clutter-util.c: + (gtk_clutter_texture_new_from_pixbuf), + (gtk_clutter_texture_set_from_pixbuf): Check if the pixbuf has + an alpha before setting the BPP. + ======== Clutter-GTK 0.8.1 ==================================================== 2008-07-18 Emmanuele Bassi diff --git a/clutter-gtk/gtk-clutter-util.c b/clutter-gtk/gtk-clutter-util.c index 6ef293e..77f161e 100644 --- a/clutter-gtk/gtk-clutter-util.c +++ b/clutter-gtk/gtk-clutter-util.c @@ -182,7 +182,8 @@ gtk_clutter_texture_new_from_pixbuf (GdkPixbuf *pixbuf) gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf), gdk_pixbuf_get_rowstride (pixbuf), - 4, 0, + gdk_pixbuf_get_has_alpha (pixbuf) ? 3 : 4, + 0, &error); if (error) { @@ -218,7 +219,8 @@ gtk_clutter_texture_set_from_pixbuf (ClutterTexture *texture, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf), gdk_pixbuf_get_rowstride (pixbuf), - 4, 0, + gdk_pixbuf_get_has_alpha (pixbuf) ? 3 : 4, + 0, &error); if (error) { -- 1.7.9.5