2008-07-31 Emmanuele Bassi <ebassi@openedhand.com>
authorEmmanuele Bassi <ebassi@openedhand.com>
Thu, 31 Jul 2008 11:32:10 +0000 (11:32 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Thu, 31 Jul 2008 11:32:10 +0000 (11:32 +0000)
* 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
clutter-gtk/gtk-clutter-util.c

index 4152b6e..98e1801 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-31  Emmanuele Bassi  <ebassi@openedhand.com>
+
+       * 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  <ebassi@openedhand.com>
index 6ef293e..77f161e 100644 (file)
@@ -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)
     {