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

Issue 2529543003: Add inline JPEGs. (Closed)

Created:
4 years ago by rbpotter
Modified:
4 years ago
Reviewers:
dsinclair, Wei Li, weili
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Add inline JPEGs. Allows JPEG data to be copied into the file rather than left in a separate file. This is needed to allow rasterized PDFs to avoid saving image files for each page. See Chromium issue 2524143003 for chromium changes. BUG=534945, 550205, 480628 Review-Url: https://codereview.chromium.org/2529543003 Committed: https://pdfium.googlesource.com/pdfium/+/f085db37c21ad2bd66e349f9307fc89b426217f5

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fix rebase #

Total comments: 8

Patch Set 4 : Add new API for inline JPEGs #

Total comments: 2

Patch Set 5 : Consolidate common code #

Total comments: 2

Patch Set 6 : Return to 2 functions #

Total comments: 1

Patch Set 7 : Fix extra arg #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -6 lines) Patch
M core/fpdfapi/page/cpdf_image.h View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M core/fpdfapi/page/cpdf_image.cpp View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M fpdfsdk/fpdfeditimg.cpp View 1 2 3 4 5 2 chunks +28 lines, -6 lines 0 comments Download
M public/fpdf_edit.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (16 generated)
rbpotter
See issue description. If you aren't the right person to review this, let me know. ...
4 years ago (2016-12-13 20:21:48 UTC) #7
dsinclair
https://codereview.chromium.org/2529543003/diff/40001/fpdfsdk/fpdfeditimg.cpp File fpdfsdk/fpdfeditimg.cpp (right): https://codereview.chromium.org/2529543003/diff/40001/fpdfsdk/fpdfeditimg.cpp#newcode43 fpdfsdk/fpdfeditimg.cpp:43: pImgObj->GetImage()->SetJpegImageInline(pFile); If this has side-effects we probably don't want ...
4 years ago (2016-12-13 20:37:14 UTC) #9
weili
Adding a new API looks good. https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp#newcode145 core/fpdfapi/page/cpdf_image.cpp:145: uint32_t size = ...
4 years ago (2016-12-13 21:55:01 UTC) #11
rbpotter
https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp#newcode145 core/fpdfapi/page/cpdf_image.cpp:145: uint32_t size = (uint32_t)pFile->GetSize(); On 2016/12/13 21:55:01, weili wrote: ...
4 years ago (2016-12-14 01:03:28 UTC) #12
Wei Li
Looks good otherwise https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp#newcode157 core/fpdfapi/page/cpdf_image.cpp:157: m_pStream->InitStream(&(data[0]), size, std::move(pDict)); On 2016/12/14 01:03:28, ...
4 years ago (2016-12-14 01:33:00 UTC) #13
Wei Li
https://codereview.chromium.org/2529543003/diff/80001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/80001/core/fpdfapi/page/cpdf_image.cpp#newcode136 core/fpdfapi/page/cpdf_image.cpp:136: if (!pDict && size > dwEstimateSize) { Also, if ...
4 years ago (2016-12-14 17:29:38 UTC) #14
rbpotter
https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/40001/core/fpdfapi/page/cpdf_image.cpp#newcode157 core/fpdfapi/page/cpdf_image.cpp:157: m_pStream->InitStream(&(data[0]), size, std::move(pDict)); On 2016/12/14 01:33:00, Wei Li wrote: ...
4 years ago (2016-12-14 18:03:37 UTC) #15
Wei Li
lgtm https://codereview.chromium.org/2529543003/diff/100001/core/fpdfapi/page/cpdf_image.cpp File core/fpdfapi/page/cpdf_image.cpp (right): https://codereview.chromium.org/2529543003/diff/100001/core/fpdfapi/page/cpdf_image.cpp#newcode121 core/fpdfapi/page/cpdf_image.cpp:121: bool inlineImage) { |inlineImage| is no longer needed
4 years ago (2016-12-14 19:01:19 UTC) #16
Wei Li
lgtm
4 years ago (2016-12-14 19:01:21 UTC) #17
dsinclair
lgtm
4 years ago (2016-12-14 19:44:15 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2529543003/120001
4 years ago (2016-12-14 19:44:17 UTC) #25
commit-bot: I haz the power
4 years ago (2016-12-14 19:44:36 UTC) #28
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://pdfium.googlesource.com/pdfium/+/f085db37c21ad2bd66e349f9307fc89b4262...

Powered by Google App Engine
This is Rietveld 408576698