OLD | NEW |
1 /* | 1 /* |
2 * The copyright in this software is being made available under the 2-clauses | 2 * The copyright in this software is being made available under the 2-clauses |
3 * BSD License, included below. This software may be subject to other third | 3 * BSD License, included below. This software may be subject to other third |
4 * party and contributor rights, including patent rights, and no such rights | 4 * party and contributor rights, including patent rights, and no such rights |
5 * are granted under this license. | 5 * are granted under this license. |
6 * | 6 * |
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium | 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium |
8 * Copyright (c) 2002-2014, Professor Benoit Macq | 8 * Copyright (c) 2002-2014, Professor Benoit Macq |
9 * Copyright (c) 2001-2003, David Janssens | 9 * Copyright (c) 2001-2003, David Janssens |
10 * Copyright (c) 2002-2003, Yannick Verschueren | 10 * Copyright (c) 2002-2003, Yannick Verschueren |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 p_image->color_space = OPJ_CLRSPC_SYCC; | 1422 p_image->color_space = OPJ_CLRSPC_SYCC; |
1423 else if (jp2->enumcs == 24) | 1423 else if (jp2->enumcs == 24) |
1424 p_image->color_space = OPJ_CLRSPC_EYCC; | 1424 p_image->color_space = OPJ_CLRSPC_EYCC; |
1425 else | 1425 else |
1426 p_image->color_space = OPJ_CLRSPC_UNKNOWN; | 1426 p_image->color_space = OPJ_CLRSPC_UNKNOWN; |
1427 | 1427 |
1428 if(jp2->color.jp2_pclr) { | 1428 if(jp2->color.jp2_pclr) { |
1429 /* Part 1, I.5.3.4: Either both or none : */ | 1429 /* Part 1, I.5.3.4: Either both or none : */ |
1430 if( !jp2->color.jp2_pclr->cmap) | 1430 if( !jp2->color.jp2_pclr->cmap) |
1431 opj_jp2_free_pclr(&(jp2->color)); | 1431 opj_jp2_free_pclr(&(jp2->color)); |
1432 » » else | 1432 » » else if (p_image->pdfium_use_colorspace) |
1433 opj_jp2_apply_pclr(p_image, &(jp2->color)); | 1433 opj_jp2_apply_pclr(p_image, &(jp2->color)); |
1434 } | 1434 } |
1435 | 1435 |
1436 /* Apply the color space if needed */ | 1436 /* Apply the color space if needed */ |
1437 if(jp2->color.jp2_cdef) { | 1437 if(jp2->color.jp2_cdef) { |
1438 opj_jp2_apply_cdef(p_image, &(jp2->color)); | 1438 opj_jp2_apply_cdef(p_image, &(jp2->color)); |
1439 } | 1439 } |
1440 | 1440 |
1441 if(jp2->color.icc_profile_buf) { | 1441 if(jp2->color.icc_profile_buf) { |
1442 p_image->icc_profile_buf = jp2->color.icc_profile_buf; | 1442 p_image->icc_profile_buf = jp2->color.icc_profile_buf; |
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 len = opj_stream_tell(cio)-lenp; | 2991 len = opj_stream_tell(cio)-lenp; |
2992 opj_stream_skip(cio, lenp, p_manager); | 2992 opj_stream_skip(cio, lenp, p_manager); |
2993 opj_write_bytes(l_data_header,len,4);/* L */ | 2993 opj_write_bytes(l_data_header,len,4);/* L */ |
2994 opj_stream_write_data(cio,l_data_header,4,p_manager); | 2994 opj_stream_write_data(cio,l_data_header,4,p_manager); |
2995 opj_stream_seek(cio, lenp+len,p_manager); | 2995 opj_stream_seek(cio, lenp+len,p_manager); |
2996 | 2996 |
2997 return len; | 2997 return len; |
2998 } | 2998 } |
2999 #endif | 2999 #endif |
3000 #endif /* USE_JPIP */ | 3000 #endif /* USE_JPIP */ |
OLD | NEW |