diff options
author | Arjan van de Ven <arjan@fenrus.demon.nl> | 1999-12-04 18:17:52 +0000 |
---|---|---|
committer | Arjan van de Ven <arjan@src.gnome.org> | 1999-12-04 18:17:52 +0000 |
commit | 631f507f58a98f208b22aac4f121d05da579b73f (patch) | |
tree | 9d30654596e1d60db7a214e14601bcda5a65034a /gdk-pixbuf/io-ras.c | |
parent | d8b35eab3e8f010e0930bbd7e34e966207fc949c (diff) | |
download | gtk+-631f507f58a98f208b22aac4f121d05da579b73f.tar.gz |
Major cleanup, added support for 32 bpp and 4 bpp (uncompressed) images,
1999-12-04 Arjan van de Ven <arjan@fenrus.demon.nl>
* gdk-pixbuf/io-bmp.c: Major cleanup, added support for
32 bpp and 4 bpp (uncompressed) images, fixed 1bpp.
* gdk-pixbuf/io-ras.c: Minor cleanup, ran through lclint
* gdk-pixbuf/io-ico.c: Minor cleanup, fixed 1bpp icons,
ran through lclint.
* gdk-pixbuf/gdk-pixbuf-io.c: Added detection of .CUR files
(Windows Cursor files). These are identical to .ICO files,
except for the signature and 2 extra fields for the hotspot.
Diffstat (limited to 'gdk-pixbuf/io-ras.c')
-rw-r--r-- | gdk-pixbuf/io-ras.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/gdk-pixbuf/io-ras.c b/gdk-pixbuf/io-ras.c index de602b473c..7073134945 100644 --- a/gdk-pixbuf/io-ras.c +++ b/gdk-pixbuf/io-ras.c @@ -71,17 +71,6 @@ static unsigned int be32_to_cpu(guint i) return i2; } -/* - Destroy notification function for the libart pixbuf -*/ - -static void free_buffer(gpointer user_data, gpointer data) -{ - free(data); -} - - - /* Progressive loading */ @@ -126,7 +115,6 @@ GdkPixbuf *image_load(FILE * f) guchar *membuf; size_t length; struct ras_progressive_state *State; - int fd; GdkPixbuf *pb; @@ -138,7 +126,7 @@ GdkPixbuf *image_load(FILE * f) while (feof(f) == 0) { length = fread(membuf, 1, 4096, f); - image_load_increment(State, membuf, length); + (void)image_load_increment(State, membuf, length); } g_free(membuf); if (State->pixbuf != NULL) @@ -147,7 +135,7 @@ GdkPixbuf *image_load(FILE * f) pb = State->pixbuf; image_stop_load(State); - return State->pixbuf; + return pb; } static void RAS2State(struct rasterfile *RAS, @@ -416,7 +404,7 @@ gboolean image_load_increment(gpointer data, guchar * buf, guint size) if (BytesToCopy > size) BytesToCopy = size; - memcpy(context->HeaderBuf + context->HeaderDone, + memmove(context->HeaderBuf + context->HeaderDone, buf, BytesToCopy); size -= BytesToCopy; @@ -431,7 +419,7 @@ gboolean image_load_increment(gpointer data, guchar * buf, guint size) BytesToCopy = size; if (BytesToCopy > 0) { - memcpy(context->LineBuf + + memmove(context->LineBuf + context->LineDone, buf, BytesToCopy); |