summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/0000-use-colorspace.patch
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-03 14:44:16 -0700
committerLei Zhang <thestig@chromium.org>2015-09-03 14:44:16 -0700
commit55512706477c035ee27413a7a2c9a75f31ceae34 (patch)
tree8326c0a043bca4c945978c451ea27f3936c805a6 /third_party/libopenjpeg20/0000-use-colorspace.patch
parent662816e763bbefe21c8c1b154328e131321f56b6 (diff)
downloadpdfium-55512706477c035ee27413a7a2c9a75f31ceae34.tar.xz
Merge to XFA: Reapply Foxit's libopenjpeg modifications.
They were lost in commit d53e6fd. BUG=pdfium:168 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1196523002 . (cherry picked from commit 870b5b6793fa261f0c6f31f026010d2d715968bf) Review URL: https://codereview.chromium.org/1301323007 .
Diffstat (limited to 'third_party/libopenjpeg20/0000-use-colorspace.patch')
-rw-r--r--third_party/libopenjpeg20/0000-use-colorspace.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/libopenjpeg20/0000-use-colorspace.patch b/third_party/libopenjpeg20/0000-use-colorspace.patch
new file mode 100644
index 0000000000..92f83a2291
--- /dev/null
+++ b/third_party/libopenjpeg20/0000-use-colorspace.patch
@@ -0,0 +1,25 @@
+diff -u a/jp2.c b/jp2.c
+--- a/jp2.c
++++ b/jp2.c
+@@ -1429,7 +1429,7 @@
+ /* Part 1, I.5.3.4: Either both or none : */
+ if( !jp2->color.jp2_pclr->cmap)
+ opj_jp2_free_pclr(&(jp2->color));
+- else
++ else if (p_image->pdfium_use_colorspace)
+ opj_jp2_apply_pclr(p_image, &(jp2->color));
+ }
+
+diff -u a/openjpeg.h b/openjpeg.h
+--- a/openjpeg.h
++++ b/openjpeg.h
+@@ -677,6 +677,9 @@
+ OPJ_BYTE *icc_profile_buf;
+ /** size of ICC profile */
+ OPJ_UINT32 icc_profile_len;
++
++ /** Whether to apply PCLR or not */
++ OPJ_BOOL pdfium_use_colorspace;
+ } opj_image_t;
+
+