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

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | testing/resources/pixel/bug_71.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 81de30e58ab6ac2b52a783b8e0553a86628b71f8..b7e032e61477d6b14d8fe140857ff7f62eedb89e 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -627,7 +627,7 @@ class CJPX_Decoder {
opj_image_t* image;
opj_codec_t* l_codec;
opj_stream_t* l_stream;
- bool m_UseColorSpace;
+ const bool m_UseColorSpace;
};
CJPX_Decoder::CJPX_Decoder(bool use_colorspace)
@@ -687,6 +687,8 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size) {
image = NULL;
return FALSE;
}
+ image->pdfium_use_colorspace = m_UseColorSpace;
+
if (!parameters.nb_tile_to_decode) {
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0, parameters.DA_y0,
parameters.DA_x1, parameters.DA_y1)) {
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | testing/resources/pixel/bug_71.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698