diff options
Diffstat (limited to 'source/blender/imbuf/intern/jpeg.c')
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index c685a54cbe9..f0a3cb55181 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -434,37 +434,6 @@ next_stamp_marker: return(ibuf); } -ImBuf * imb_ibJpegImageFromFilename (const char * filename, int flags) -{ - struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; - struct my_error_mgr jerr; - FILE * infile; - ImBuf * ibuf; - - if ((infile = fopen(filename, "rb")) == NULL) return 0; - - cinfo->err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = jpeg_error; - - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - jpeg_destroy_decompress(cinfo); - fclose(infile); - return NULL; - } - - jpeg_create_decompress(cinfo); - jpeg_stdio_src(cinfo, infile); - - ibuf = ibJpegImageFromCinfo(cinfo, flags); - - fclose(infile); - return(ibuf); -} - ImBuf * imb_load_jpeg (unsigned char * buffer, size_t size, int flags) { struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; |