Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: third_party/libopenjpeg20/jp2.c

Issue 1196523002: Reapply Foxit's libopenjpeg modifications. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: with test Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libopenjpeg20/README.pdfium ('k') | third_party/libopenjpeg20/openjpeg.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 */
OLDNEW
« no previous file with comments | « third_party/libopenjpeg20/README.pdfium ('k') | third_party/libopenjpeg20/openjpeg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698