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

Issue 1009513003: Fix a problem that JP2 image is not displayed because index color space is used (Closed)

Created:
5 years, 9 months ago by jun_fang
Modified:
5 years, 9 months ago
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix a problem that JP2 image is not displayed because index color space is used There are two issues in this bug. One is that JP2 image is not displayed because it aborts loading Jpx bitmap when the number of components in color space is different with that one in JPX images. I found that the number of components in color space isn't updated after it's initialized. For index color space, the component shall inherit from its base color space. The second issue is that displayed color is not correct after I fixed the first issue. The root cause is that sRGB is used in JPX image, it doesn't need to map from index to RGB again. BUG=464215 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/5a0e504d53195892458d819e52c62bea0c710bd5

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -13 lines) Patch
M core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp View 1 3 chunks +20 lines, -11 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
jun_fang
Hi Tom, Please review it.
5 years, 9 months ago (2015-03-15 07:04:15 UTC) #2
Tom Sepez
On 2015/03/15 07:04:15, jun_fang wrote: > Hi Tom, > > Please review it. Can I ...
5 years, 9 months ago (2015-03-16 17:03:08 UTC) #3
Tom Sepez
See comment + nit, Otherwise LGTM https://codereview.chromium.org/1009513003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp (right): https://codereview.chromium.org/1009513003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp#newcode844 core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp:844: comps[i] = *(pBuf ...
5 years, 9 months ago (2015-03-16 17:07:59 UTC) #4
jun_fang
On 2015/03/16 17:07:59, Tom Sepez wrote: > See comment + nit, Otherwise LGTM > > ...
5 years, 9 months ago (2015-03-16 19:07:13 UTC) #5
jun_fang
https://codereview.chromium.org/1009513003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp (right): https://codereview.chromium.org/1009513003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp#newcode844 core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp:844: comps[i] = *(pBuf + i) / 255; On 2015/03/16 ...
5 years, 9 months ago (2015-03-16 19:07:39 UTC) #6
jun_fang
5 years, 9 months ago (2015-03-16 19:10:15 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
5a0e504d53195892458d819e52c62bea0c710bd5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698