diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-05-19 21:07:27 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-05-19 21:07:27 -0700 |
commit | c10594536108203e215e50bf3cf61c7e8aeb733f (patch) | |
tree | 1b84c7cf6a628745f0ed76a1dcb827530ef3d8de | |
parent | 1fde363229b261038dab179c91106d3d4e03cc32 (diff) | |
download | mirror-meh-c10594536108203e215e50bf3cf61c7e8aeb733f.tar.gz mirror-meh-c10594536108203e215e50bf3cf61c7e8aeb733f.tar.bz2 mirror-meh-c10594536108203e215e50bf3cf61c7e8aeb733f.zip |
ready for gif decoder
-rw-r--r-- | src/gif.c | 9 | ||||
-rw-r--r-- | src/gif.h | 5 | ||||
-rw-r--r-- | src/jpeg.c | 1 | ||||
-rw-r--r-- | src/main.c | 5 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/gif.c b/src/gif.c new file mode 100644 index 0000000..0c1ebb3 --- /dev/null +++ b/src/gif.c @@ -0,0 +1,9 @@ + +#include <stdio.h> + +#include "gif.h" + +unsigned char *loadgif(FILE *infile, int *bufwidth, int *bufheight){ + return NULL; +} + diff --git a/src/gif.h b/src/gif.h new file mode 100644 index 0000000..17a86dc --- /dev/null +++ b/src/gif.h @@ -0,0 +1,5 @@ + +#include <stdio.h> + +unsigned char *loadgif(FILE *, int *, int *); + @@ -66,7 +66,6 @@ unsigned char *loadjpeg(FILE *infile, int *width, int *height){ } jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); - fclose(infile); return retbuf; } @@ -10,7 +10,7 @@ #include <sys/time.h> #include "jpeg.h" -#include "util.h" +#include "gif.h" Display *display; int screen; @@ -130,8 +130,7 @@ unsigned char *loadbuf(const char *filename, int *bufwidth, int *bufheight){ printf("IT'S A PNG!!!\n"); buf = NULL; }else if(!memcmp("GIF", head, 3)){ - printf("IT'S A GIF!!!\n"); - buf = NULL; + buf = loadgif(f, bufwidth, bufheight); }else{ fprintf(stderr, "Unknown file type: '%s'\n", filename); buf = NULL; |