diff options
Diffstat (limited to 'src')
-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; |