]> Pileus Git - ~andy/gtk/commitdiff
image_load_increment(): Fixed bug when image width was not a multiple of 4
authorMichael Fulbright <drmike@redhat.com>
Fri, 29 Oct 1999 22:43:51 +0000 (22:43 +0000)
committerMichael Fulbright <drmike@src.gnome.org>
Fri, 29 Oct 1999 22:43:51 +0000 (22:43 +0000)
1999-10-29  Michael Fulbright  <drmike@redhat.com>

        * src/io-jpeg.c: image_load_increment(): Fixed bug when
        image width was not a multiple of 4 - always use the
        gdk_pixbuf rowstride to increment pointers!

gdk-pixbuf/io-jpeg.c

index b994780b44683082d2f0d0b51f5f8e12a3a3a60a..c06a2634951ffb84b295ebeb02949636cf724e8b 100644 (file)
@@ -466,7 +466,7 @@ image_load_increment (gpointer data, guchar *buf, guint size)
                                rowptr = context->dptr;
                                for (i=0; i < cinfo->rec_outbuf_height; i++) {
                                        *lptr++ = rowptr;
-                                       rowptr += cinfo->image_width * 3;
+                                       rowptr +=  context->pixbuf->art_pixbuf->rowstride;;
                                }
                                
                                nlines = jpeg_read_scanlines (cinfo, lines,
@@ -478,7 +478,7 @@ image_load_increment (gpointer data, guchar *buf, guint size)
                                if (cinfo->output_components == 1)
                                        explode_gray_into_buf (cinfo, lines);
 
-                               context->dptr += nlines * cinfo->image_width * 3;
+                               context->dptr += nlines * context->pixbuf->art_pixbuf->rowstride;
 #ifdef DEBUG_JPEG_PROGRESSIVE
                                
                                if (start_scanline != cinfo->output_scanline)