]> Pileus Git - ~andy/gtk/commitdiff
Some bug fixes - now tested to work.
authorElliot Lee <sopwith@src.gnome.org>
Tue, 1 Aug 2000 00:33:49 +0000 (00:33 +0000)
committerElliot Lee <sopwith@src.gnome.org>
Tue, 1 Aug 2000 00:33:49 +0000 (00:33 +0000)
* io-wbmp.c: Some bug fixes - now tested to work.

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-wbmp.c

index 44bfcb123a2575e4e0f1008120fbd4a6b769b425..745578d87d182a907b26162d49977744dd90fccd 100644 (file)
@@ -1,3 +1,6 @@
+2000-07-31  Elliot Lee  <sopwith@redhat.com>
+       * io-wbmp.c: Some bug fixes - now tested to work.
+
 2000-07-27  Elliot Lee  <sopwith@redhat.com>
        * gdk-pixbuf-io.h, gdk-pixbuf-io.c: Add gdk_pixbuf_get_named_module() function to facilitate above change
        * io-wbmp.c, pixbufloader_wbmp.defs, gdk-pixbuf-io.c, Makefile: Implement loader for WBMP format.
index 76cb8e65e0a26543a765952b095e53b58c7b9e64..d49658930b9cbde799eb6979a3ca436a7a8550bc 100644 (file)
@@ -199,7 +199,7 @@ get_mbi(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, i
   } while(n < sizeof(intbuf) && (intbuf[n-1] & 0x80));
 
  out:
-  if(!rv || !(intbuf[n-1] & 0x80))
+  if(!rv || (intbuf[n-1] & 0x80))
     {
       rv = save_rest(context, intbuf, n);
 
@@ -263,6 +263,8 @@ gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, guchar * buf,
                  {
                    context->need_height = FALSE;
                    context->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, context->width, context->height);
+                   g_assert(context->pixbuf);
+
                    if(context->prepared_func)
                      context->prepared_func(context->pixbuf, context->user_data);
                  }
@@ -283,7 +285,7 @@ gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, guchar * buf,
                          goto out;
 
                        ptr = context->pixbuf->pixels + context->pixbuf->rowstride * context->cury + context->curx * 3;
-                       for(xoff = 0; xoff < 8; xoff++, ptr += 3)
+                       for(xoff = 7; xoff >= 0; xoff--, ptr += 3)
                          {
                            guchar pixval;