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.
This commit is contained in:

committed by
Michael Fulbright

parent
12474a79ae
commit
d2bfbdb99e
@ -30,6 +30,7 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
FILE *imagefile;
|
FILE *imagefile;
|
||||||
GdkPixbufLoader *loader;
|
GdkPixbufLoader *loader;
|
||||||
|
GtkWidget **rgbwin;
|
||||||
guchar *buf;
|
guchar *buf;
|
||||||
guint timeout;
|
guint timeout;
|
||||||
guint readlen;
|
guint readlen;
|
||||||
@ -446,6 +447,7 @@ update_timeout(gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (done) {
|
if (done) {
|
||||||
|
gtk_widget_queue_draw(*status->rgbwin);
|
||||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
|
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
|
||||||
gtk_object_destroy (GTK_OBJECT(status->loader));
|
gtk_object_destroy (GTK_OBJECT(status->loader));
|
||||||
fclose (status->imagefile);
|
fclose (status->imagefile);
|
||||||
@ -561,6 +563,8 @@ main (int argc, char **argv)
|
|||||||
pixbuf_loader = gdk_pixbuf_loader_new ();
|
pixbuf_loader = gdk_pixbuf_loader_new ();
|
||||||
status.loader = pixbuf_loader;
|
status.loader = pixbuf_loader;
|
||||||
|
|
||||||
|
status.rgbwin = &rgb_window;
|
||||||
|
|
||||||
status.buf = g_malloc (readlen);
|
status.buf = g_malloc (readlen);
|
||||||
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
|
||||||
"area_prepared",
|
"area_prepared",
|
||||||
|
@ -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>
|
1999-11-10 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious
|
* src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious
|
||||||
|
@ -519,7 +519,7 @@ pnm_read_ascii_scanline (PnmLoaderContext *context)
|
|||||||
|
|
||||||
if (context->type == PNM_FORMAT_PBM) {
|
if (context->type == PNM_FORMAT_PBM) {
|
||||||
*dptr++ = data;
|
*dptr++ = data;
|
||||||
context->output_col += 8;
|
context->output_col += numval;
|
||||||
} else {
|
} else {
|
||||||
context->output_col++;
|
context->output_col++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user