summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/0007-jp2_read_cmap.patch
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-12-21 00:16:21 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-12-21 00:16:21 +0800
commite13aa30ebc64800b7e208e338ec5d520de2d2ebd (patch)
tree067b5c86c59ff6576006e111ffaba5735d554fbb /third_party/libopenjpeg20/0007-jp2_read_cmap.patch
parent4880d1a168729d42be736293fb93b514802e4f12 (diff)
downloadpdfium-e13aa30ebc64800b7e208e338ec5d520de2d2ebd.tar.xz
Merge to XFA: Fix wrong rendering on greyscale images with index colorspace
BUG=514514 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1536223002 . Merge branch 'xfa' of https://pdfium.googlesource.com/pdfium into xfa Merge to XFA: Correct return values in CPDF_HintTables::CheckPage() BUG=pdfium:329 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1529173005 . Review URL: https://codereview.chromium.org/1539163002 .
Diffstat (limited to 'third_party/libopenjpeg20/0007-jp2_read_cmap.patch')
-rw-r--r--third_party/libopenjpeg20/0007-jp2_read_cmap.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/libopenjpeg20/0007-jp2_read_cmap.patch b/third_party/libopenjpeg20/0007-jp2_read_cmap.patch
new file mode 100644
index 0000000000..30f9e4b2d7
--- /dev/null
+++ b/third_party/libopenjpeg20/0007-jp2_read_cmap.patch
@@ -0,0 +1,13 @@
+diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+index 6e910a9..f3baca5 100644
+--- a/third_party/libopenjpeg20/jp2.c
++++ b/third_party/libopenjpeg20/jp2.c
+@@ -1194,7 +1194,7 @@ static OPJ_BOOL opj_jp2_read_cmap( opj_jp2_t * jp2,
+
+
+ for(i = 0; i < nr_channels; ++i) {
+- opj_read_bytes(p_cmap_header_data, &l_value, 2); /* CMP^i */
++ opj_read_bytes_BE(p_cmap_header_data, &l_value, 2); /* CMP^i */
+ p_cmap_header_data +=2;
+ cmap[i].cmp = (OPJ_UINT16) l_value;
+