diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
commit | a42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch) | |
tree | 81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/imbuf/intern/jpeg.c | |
parent | 7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff) | |
parent | a73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff) |
Merged changes in the trunk up to revision 50829.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/imbuf/intern/jpeg.c')
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 364950b99cb..61275a8937c 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -48,9 +48,12 @@ #include "jpeglib.h" #include "jerror.h" -#define IS_jpg(x) (x->ftype & JPG) +#include "IMB_colormanagement.h" +#include "IMB_colormanagement_intern.h" + +// #define IS_jpg(x) (x->ftype & JPG) // UNUSED #define IS_stdjpg(x) ((x->ftype & JPG_MSK) == JPG_STD) -#define IS_vidjpg(x) ((x->ftype & JPG_MSK) == JPG_VID) +// #define IS_vidjpg(x) ((x->ftype & JPG_MSK) == JPG_VID) // UNUSED #define IS_jstjpg(x) ((x->ftype & JPG_MSK) == JPG_JST) #define IS_maxjpg(x) ((x->ftype & JPG_MSK) == JPG_MAX) @@ -435,21 +438,22 @@ next_stamp_marker: jpeg_destroy((j_common_ptr) cinfo); if (ibuf) { ibuf->ftype = ibuf_ftype; - ibuf->profile = IB_PROFILE_SRGB; } } return(ibuf); } -ImBuf *imb_load_jpeg(unsigned char *buffer, size_t size, int flags) +ImBuf *imb_load_jpeg(unsigned char *buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; struct my_error_mgr jerr; ImBuf *ibuf; if (!imb_is_a_jpeg(buffer)) return NULL; - + + colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); + cinfo->err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = jpeg_error; |