diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-06-15 21:20:46 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-06-15 21:20:46 -0700 |
commit | d1ea7c8e8f53dd1885ca2c8b951089cdbee3f180 (patch) | |
tree | 51762de7cc70736b054658f62cad6391293d825b /src/meh.h | |
parent | e2b399b75b3f5c5cdb34001f46afb503820200a0 (diff) | |
download | mirror-meh-d1ea7c8e8f53dd1885ca2c8b951089cdbee3f180.tar.gz mirror-meh-d1ea7c8e8f53dd1885ca2c8b951089cdbee3f180.tar.bz2 mirror-meh-d1ea7c8e8f53dd1885ca2c8b951089cdbee3f180.zip |
split format work into seperate functions. Only JPEG works for now
Diffstat (limited to 'src/meh.h')
-rw-r--r-- | src/meh.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,6 +1,20 @@ #include <stdio.h> +struct image; + +struct imageformat{ + struct image *(*open)(FILE *); + int (*read)(struct image *); +}; + +struct image{ + unsigned char *buf; + int width, height; + FILE *f; + struct imageformat *fmt; +}; + unsigned char *loadgif(FILE *, int *, int *); unsigned char *loadjpeg(FILE *, int *, int *); unsigned char *loadpng(FILE *, int *, int *); |