diff options
author | Michael Fulbright <drmike@redhat.com> | 1999-11-10 17:43:49 +0000 |
---|---|---|
committer | Michael Fulbright <drmike@src.gnome.org> | 1999-11-10 17:43:49 +0000 |
commit | d2bfbdb99e600cdfdd3cdf108c4249c3d9216341 (patch) | |
tree | 11c818d8fb62f29638d89936ed1cb1c34ee7d6a8 | |
parent | 12474a79aee4c960eeaec577b833403cbfad9193 (diff) | |
download | gtk+-d2bfbdb99e600cdfdd3cdf108c4249c3d9216341.tar.gz |
Fixed loading of ASCII PNM files.
1999-11-10 Michael Fulbright <drmike@redhat.com>
* src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM
files.
* src/testpixbuf.c: Added final queued draw when done loading image.
-rw-r--r-- | demos/testpixbuf.c | 4 | ||||
-rw-r--r-- | gdk-pixbuf/ChangeLog | 7 | ||||
-rw-r--r-- | gdk-pixbuf/io-pnm.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c index 9d15087551..534bef1965 100644 --- a/demos/testpixbuf.c +++ b/demos/testpixbuf.c @@ -30,6 +30,7 @@ typedef struct { FILE *imagefile; GdkPixbufLoader *loader; + GtkWidget **rgbwin; guchar *buf; guint timeout; guint readlen; @@ -446,6 +447,7 @@ update_timeout(gpointer data) } if (done) { + gtk_widget_queue_draw(*status->rgbwin); gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader)); gtk_object_destroy (GTK_OBJECT(status->loader)); fclose (status->imagefile); @@ -561,6 +563,8 @@ main (int argc, char **argv) pixbuf_loader = gdk_pixbuf_loader_new (); status.loader = pixbuf_loader; + status.rgbwin = &rgb_window; + status.buf = g_malloc (readlen); gtk_signal_connect(GTK_OBJECT(pixbuf_loader), "area_prepared", diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 2d6c396c08..f8db2df1d8 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,10 @@ +1999-11-10 Michael Fulbright <drmike@redhat.com> + + * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM + files. + + * src/testpixbuf.c: Added final queued draw when done loading image. + 1999-11-10 Jonathan Blandford <jrb@redhat.com> * src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c index 5165a9e863..a987106ed5 100644 --- a/gdk-pixbuf/io-pnm.c +++ b/gdk-pixbuf/io-pnm.c @@ -519,7 +519,7 @@ pnm_read_ascii_scanline (PnmLoaderContext *context) if (context->type == PNM_FORMAT_PBM) { *dptr++ = data; - context->output_col += 8; + context->output_col += numval; } else { context->output_col++; } |