Commit 4d721750 authored by Elliot Lee's avatar Elliot Lee

Some bug fixes - now tested to work.



* io-wbmp.c: Some bug fixes - now tested to work.
parent 75225b9f
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.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment