diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-05-19 20:04:22 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-05-19 20:04:22 -0700 |
commit | bfbeab9e9a7446ed6b40c0ad557d631c0d738c6c (patch) | |
tree | 227e1d9caded47241edb21f55151eaebe262d923 /src/jpeg.c | |
parent | 02a0e01267d6c5be936b32360968199013e8096d (diff) | |
download | mirror-meh-bfbeab9e9a7446ed6b40c0ad557d631c0d738c6c.tar.gz mirror-meh-bfbeab9e9a7446ed6b40c0ad557d631c0d738c6c.tar.bz2 mirror-meh-bfbeab9e9a7446ed6b40c0ad557d631c0d738c6c.zip |
prepare for other file types
Diffstat (limited to 'src/jpeg.c')
-rw-r--r-- | src/jpeg.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -19,11 +19,10 @@ static void error_exit(j_common_ptr cinfo){ exit(1); } -unsigned char *loadjpeg(char *filename, int *width, int *height){ +unsigned char *loadjpeg(FILE *infile, int *width, int *height){ struct jpeg_decompress_struct cinfo; struct error_mgr jerr; - FILE *infile; JSAMPARRAY buffer; int row_stride; int i = 0; @@ -31,11 +30,6 @@ unsigned char *loadjpeg(char *filename, int *width, int *height){ int y; unsigned char *retbuf; - if((infile = fopen(filename, "rb")) == NULL){ - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = error_exit; |