diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-12 13:55:41 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-12 13:55:41 +0000 |
| commit | dd0d2c2f0ae4f7c7bfd91876e7e19f8f3e791440 (patch) | |
| tree | 1511784ec6fd721f12a93b713ba752cec8a8a12e /src | |
| parent | d38e32c036d85a394871c103ab44a20033818b51 (diff) | |
[trunk] Add debug info to be able to test integration with littlecms
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/common/color.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/common/color.c b/src/bin/common/color.c index a9b5e0c7..8b3d2a7e 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -33,6 +33,7 @@ #include <string.h> #include <stdlib.h> #include <math.h> +#include <assert.h> #include "opj_apps_config.h" #include "openjpeg.h" @@ -292,6 +293,7 @@ void color_sycc_to_rgb(opj_image_t *img) #endif /* OPJ_HAVE_LIBLCMS1 */ +/*#define DEBUG_PROFILE*/ void color_apply_icc_profile(opj_image_t *image) { cmsHPROFILE in_prof, out_prof; @@ -304,6 +306,11 @@ void color_apply_icc_profile(opj_image_t *image) in_prof = cmsOpenProfileFromMem(image->icc_profile_buf, image->icc_profile_len); +#ifdef DEBUG_PROFILE + FILE *icm = fopen("debug.icm","wb"); + fwrite( image->icc_profile_buf,1, image->icc_profile_len,icm); + fclose(icm); +#endif if(in_prof == NULL) return; |
