Age | Commit message (Collapse) | Author |
|
This CL moves CFX_AutoRestorer into its own file, separate from
fx_basic.h.
Change-Id: I415cb9207416bd4744b8ac8e2d7466852db53f0a
Reviewed-on: https://pdfium-review.googlesource.com/12390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Through out the code base there are numerous places where variables
are declared using a signed integer type when interacting with the
string classes, since they assume that FX_STRSIZE is 'int'. As part of
changing the underling type of FX_STRSIZE to be unsigned, these
locations are being changed to use FX_STRSIZE. This is necessary as
part of converting the type, but has been broken off into a separate CL,
since it should be low risk.
Some related cleanups that are low risk are included as part of
this CL.
BUG=pdfium:828
Change-Id: Ifaae54ad195ccde0fe8672f71271d29a6ebd65fd
Reviewed-on: https://pdfium-review.googlesource.com/12210
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Instead of using CFX_FloatRect::ToFxRect(), which always rounds down,
use GetOuterRect() which correctly rounds up / down depending on the
side of the rectangle.
Change-Id: I7abd3a65e8c0467ed4303292f26a72737a5d553b
Reviewed-on: https://pdfium-review.googlesource.com/12312
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add helper function for commonly used coordinates and give coordinates
used in tests semantic meaning.
Also add more sanity checks to make sure the commonly used coordinates
pass the FPDFPage_HasFormFieldAtPoint() hit test.
Change-Id: If116ed5323b49bdbcbd4d857b5184f9fcd4eb908
Reviewed-on: https://pdfium-review.googlesource.com/12070
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FPDFFormFillInteractiveEmbeddertest subclasses know the type to expect.
Change-Id: I92c5fc75864330f5b1cbd392b9565b4323ce26b5
Reviewed-on: https://pdfium-review.googlesource.com/12052
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This removes a lot of repeated code that can go in SetUp()/TearDown().
This also makes the assumption that there is only 1 page used for
testing, so methods in the tests can refer to the page as a member
variable, rather than having a method parameter.
Change-Id: Ia77633ebe22f1184d2ee2fc78e88e7d33f48a86e
Reviewed-on: https://pdfium-review.googlesource.com/12051
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I042c5e843dcf535b2d6676d41c0037e87c59c219
Reviewed-on: https://pdfium-review.googlesource.com/12050
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFAnnot_GetAnnotIndex() to get the index of an annotation. This
is useful if linked annotations are renedered together - then we need to
know which ones in the annotation list we need to skip.
Bug=pdfium:863,pdfium:737
Change-Id: I53482a15e0fd9a896b348b64d68e99f9c21da9f9
Reviewed-on: https://pdfium-review.googlesource.com/11970
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently these use -1 as a special value to indicate not set. This
creates the same issues that FX_STRNPOS created for converting
FX_STRSIZE to size_t, so this code has been rewritten.
BUG=pdfium:828
Change-Id: Iaaa96af0dcb2eb8b600f3ea39060a398ac9a3800
Reviewed-on: https://pdfium-review.googlesource.com/12130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Remove some useless overrides.
Change-Id: Icf4d8bfcca6358ef3f59f768c2d60759d4b05243
Reviewed-on: https://pdfium-review.googlesource.com/10854
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: If038850c745ac26e50c313bdbe630483434caedc
Reviewed-on: https://pdfium-review.googlesource.com/11390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a global font loader for use in XFA tests. This is
needed because the CFGAS_FontMangaer takes a linearly increasing amount
of time to load fonts each time it's loaded. This can get excessively
slow for test suites which run a lot of tests.
Change-Id: Ie389844b56598ce414f4f761654fa4ed465955fd
Reviewed-on: https://pdfium-review.googlesource.com/12090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The crash was caused by a dangling pointer in CPWL_ListCtrl to
the font map owned by CFF_TextObject. The order of events was:
1. ~CFFL_ListBox runs and calls parent destructor ~CFFL_TextObject.
2. ~CFFL_TextObject runs and deletes its member m_pFontMap. m_FontMap
was referenced by CPWL_ListCtrl which is now dangling.
3. ~CFFL_TextObject calls parent destructor ~CFFL_FormFiller.
4. ~CFFL_FormFiller calls DestroyWindows().
5. CFFL_FormFiller::DestroyWindows() deletes widgets, among them
CPWL_ListBox.
6. ~CPWL_ListBox deletes its member CPWL_ListCtrl.
7. ~CPWL_ListCtrl sees a dangling pointer to the map and crashes.
Making the DestroyWindows() call earlier in the destructor of
CFFL_TextObject, we execute steps 5-7 before freeing m_pFontMap.
An extra DestroyWindows() is still made in ~CFFL_FormFiller, but
it is then non-op if the derived CFFL_TextObject already called it.
Bug: chromium:757506
Change-Id: Ib8dce04f1dd0bcf8e10701f6cf7ea500bfb5ba84
Reviewed-on: https://pdfium-review.googlesource.com/11651
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The Find and ReverseFind methods for WideString, WideStringC,
ByteString, and ByteStringC have been converted from returning a raw
FX_STRSIZE, to returning Optional<FX_STRSIZE>, so that success/failure
can be indicated without using FX_STRNPOS.
This allows for removing FX_STRNPOS and by association makes the
conversion of FX_STRSIZE to size_t easier, since it forces checking
the return value of Find to be explictly done as well as taking the
error value out of the range of FX_STRSIZE.
New Contains methods have been added for cases where the success or
failure is all the call site to Find cared about, and the actual
position was ignored.
BUG=pdfium:828
Change-Id: Id827e508c8660affa68cc08a13d96121369364b7
Reviewed-on: https://pdfium-review.googlesource.com/11350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently, if FPDF_LoadDocument() is called on a nonexistent file, the
returned FPDF_DOCUMENT will be null, but FPDF_GetLastError() will return
an error of FPDF_ERR_SUCCESS, i.e. no error.
This CL corrects this behavior by updating the error to be FPDF_ERR_FILE
when the file doesn't exist.
Bug=pdfium:452
Change-Id: I3c3ec3a64e049636ddfb2ba5cb5f2745a0e19b6b
Reviewed-on: https://pdfium-review.googlesource.com/11650
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Change-Id: Ic0849cce80e1797637fd875bdedd7cc560b98f22
Reviewed-on: https://pdfium-review.googlesource.com/11210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Added FPDFAnnot_GetLinkedAnnot() to retrieve annotations linked to other
annotations through a specified key.
Bug=pdfium:863,pdfium:737
Change-Id: If81f41178fb4c40f6561bd392215c709722c4000
Reviewed-on: https://pdfium-review.googlesource.com/11491
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Change some related code to take a const CFX_Matrix* since it is not
immediately obvious if the matrix can be made into a const-ref.
Change-Id: I15c840222b575cc479b1f6f0b6d3b3c0e50d5515
Reviewed-on: https://pdfium-review.googlesource.com/11113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Re-enable individual image mask rendering to improve spool sizes, with
bug fixes and improvements:
- Fix bug with missing images by ensuring all masks are recorded
- Fix printing to landscape paper sizes
- Improve spool sizes by processing the location of the masks in the
progressive renderer when rendering to the printer instead of needlessly
fully rendering them (they will be rendered as bitmaps anyway).
Bug: chromium:753700
Change-Id: I86bdcce9f10855274c56ba2ddae2c2522b36426d
Reviewed-on: https://pdfium-review.googlesource.com/11115
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:868
Change-Id: Ifd39c5c7c5486560987c18e9afb6ae3d2a4b7454
Reviewed-on: https://pdfium-review.googlesource.com/11190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:754984
Change-Id: I106d460c80804797cee537d1990f901b5bf5a519
Reviewed-on: https://pdfium-review.googlesource.com/11171
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Avoid some potential crashiness.
TBR=jochen@chromium.org
Bug: 754610
Change-Id: Ie8143c1909df7ba5783b7d20b61e31f093d04b34
Reviewed-on: https://pdfium-review.googlesource.com/10970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently, FPDFAnnot_Get{Rect|AttachmentPoints} would return BBox if the
annotation's appearance stream is defined, which does not make much
sense to the user since BBox is defined in the form space; upon
rendering, the annotation's position in the device space is solely
defined by its rectangle.
This CL removes references to BBox in FPDFAnnot_Get{Rect|
AttachmentPoints}; instead, they will only return rectangle or
quadpoints as requested. The embedder test is also modified to reflect
this change, and also to demonstrate that an annotation's position is
changed only if its rectangle is changed.
Bug=pdfium:861
Change-Id: I489876511aa5d93131dd695170d46bbc49d16574
Reviewed-on: https://pdfium-review.googlesource.com/11050
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Instead of returning structs, changed FPDFAnnot_GetRect() and
FPDFAnnot_GetAttachmentPoints() to return a bool and take a struct
as an out parameter.
Change-Id: I380e76eb1566b2488150fb31e9dad564a3ee10d4
Reviewed-on: https://pdfium-review.googlesource.com/10470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Added FPDFImageObj_GetImageMetadata() for retriving the image metadata
of image objects, including its dimension, DPI, bits per pixel, and
colorspace.
* Added a corresponding embedder test.
Bug=pdfium:677
Change-Id: I4229334d1ac2125b21a46e2e44ea937ea2e94b51
Reviewed-on: https://pdfium-review.googlesource.com/10110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Simplify some code along the way.
Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040
Reviewed-on: https://pdfium-review.googlesource.com/10852
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I15307562fcf8f0aebd6e14293b46a10106c4ace7
Reviewed-on: https://pdfium-review.googlesource.com/10858
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I529925b10fa43d4c9c6c9d398265d2ae7eccf93d
Reviewed-on: https://pdfium-review.googlesource.com/10853
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Return early in some methods.
- Make IsProceedtoOnChar() a static method.
Change-Id: I56b92d920b2c0bbdff84cb3024d80e379f1c6a2a
Reviewed-on: https://pdfium-review.googlesource.com/10857
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
So assert this is the case and remove all the pointer checks.
Change-Id: I8fa273b03c75ec169d1b03ef6fb239defddf7d67
Reviewed-on: https://pdfium-review.googlesource.com/10855
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This base class does not do anything useful.
Change-Id: Ib8c44c1778cdc992abb66177ea534bda0f1f15d3
Reviewed-on: https://pdfium-review.googlesource.com/10851
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It's redundant with SetOprNotify().
Change-Id: Iee2741744017ea6bd1b9839fc6395197c560f1e7
Reviewed-on: https://pdfium-review.googlesource.com/10850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This method duplicates the behaviour of the const [] operator and
doesn't offer any additional safety. Folding them into one
implementation.
SetAt is retained, since implementing the non-const [] operator to
replace SetAt has potential performance concerns. Specifically many
non-obvious cases of reading an element using [] will cause a realloc
& copy.
BUG=pdfium:860
Change-Id: I3ef5e5e5a15376f040256b646eb0d90636e24b67
Reviewed-on: https://pdfium-review.googlesource.com/10870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug:
Change-Id: I376f4af26791cd4ed04049ab179c2b39dd262725
Reviewed-on: https://pdfium-review.googlesource.com/10690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:753700
Change-Id: I28589739f4258fa62f3f853aa91bc6cffd7d96ba
Reviewed-on: https://pdfium-review.googlesource.com/10611
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to
be more PDFium specific.
This is split off of https://pdfium-review.googlesource.com/c/8970 by
Felix Kauselmann.
Bug: pdfium:825
Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998
Reviewed-on: https://pdfium-review.googlesource.com/10610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
builds."
This reverts commit 00334675c18a0203f313cceb670c970a77280f49.
Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307
Original change's description:
> Add a build target and a proper export header for shared library builds.
>
> This CL adds support for Chromium's component build feature to pdfium.
>
> The export header stub in fpdfview.h is expanded to match Chromium's
> export mechanisms and patterns (fixes pdfium:825).
>
> A component/shared library build can be triggered by adding
>
> is_component_build = true
>
> as a gn argument. Please note that setting this will also affect some
> of pdfiums dependencies like v8, which will be build as components
> too.
>
> Additionally, this CL provides a "pdf_source_set" template which
> dynamically enables the use of "source_set" when building a complete
> static library or a shared library to reduce build time.
>
> When testing this it is recommended to only build the pdfium target as
> most of pdfiums test rely on non-public functions which aren't exported
> by the shared library.
>
> Bug: pdfium:825,pdfium:826
> Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
> Reviewed-on: https://pdfium-review.googlesource.com/8970
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com
Change-Id: Ib02af2298932481293f50d362ae87bfedf284821
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:825, pdfium:826
Reviewed-on: https://pdfium-review.googlesource.com/10550
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change the CPDFParserEmbeddertest.Feature_Linearized_Loading test case
into FPDFViewEmbeddertest.LinearizedDocument, and add a call to
FPDF_GetFileVersion().
Change-Id: I0272c1e71c6f61393838bd3db41b154c4f5620ba
Reviewed-on: https://pdfium-review.googlesource.com/10450
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL adds support for Chromium's component build feature to pdfium.
The export header stub in fpdfview.h is expanded to match Chromium's
export mechanisms and patterns (fixes pdfium:825).
A component/shared library build can be triggered by adding
is_component_build = true
as a gn argument. Please note that setting this will also affect some
of pdfiums dependencies like v8, which will be build as components
too.
Additionally, this CL provides a "pdf_source_set" template which
dynamically enables the use of "source_set" when building a complete
static library or a shared library to reduce build time.
When testing this it is recommended to only build the pdfium target as
most of pdfiums test rely on non-public functions which aren't exported
by the shared library.
Bug: pdfium:825,pdfium:826
Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
Reviewed-on: https://pdfium-review.googlesource.com/8970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Added FPDFImageObj_GetImageFilterCount() and
FPDFImageObj_GetImageFilters() for retrieving image filters of image
objects.
* Added a corresponding embedder test.
* Changed the filter of an image object in embedded_image.pdf from
DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case
for images with more than one filter.
Bug=pdfium:677
Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962
Reviewed-on: https://pdfium-review.googlesource.com/10130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
In the original code the method of writing of objects depends on a much unpredictable factors:
as:
1) Is there an updated version of the at least one object in the document.
2) The password is changed.
3) Was this object loaded earlier.
4) The Object is compressed and document have a password.
With these factors it is difficult to predict what will be the final file.
To reduce volatility use only one method that works in all cases mentioned.
This method is parse then serialize.
Change-Id: I3d7dcadd10abffbad68d1f993f2dd60b039ed989
Reviewed-on: https://pdfium-review.googlesource.com/9572
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug=pdfium:854
Change-Id: I227418cdcb77e0aa7d48338f1ee0d753cef6bfdb
Reviewed-on: https://pdfium-review.googlesource.com/10390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Use one of the _FXM_PLATFORM_ macros we defined in fx_system.h
in its place.
Change-Id: Iabf56c2aa840927aa48532320b9cbf095b9b7b6e
Reviewed-on: https://pdfium-review.googlesource.com/10210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Because C++11 gives us std::isfinite(), std::isnan() and std::nan().
Bug: pdfium:459
Change-Id: I128f332ec908df6aff66ef76012288fd22d423ed
Reviewed-on: https://pdfium-review.googlesource.com/10190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
New version of the CL that include fpdf_parser_utility.cpp where
there is an overload for CFX_ByteTextBuf << CPDF_Object* used by
CFDF_Document.
Bug: pdfium:731
Change-Id: I54f4e9ee7e10e94388f6f6584f3999f43689e84c
Reviewed-on: https://pdfium-review.googlesource.com/10170
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Remove ifdef'd code for versions we know will no longer work.
Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb
Reviewed-on: https://pdfium-review.googlesource.com/10051
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit aea80dcc0abc0c310316fa502f91a359bc684758.
Reason for revert: WriteBuf's behavior was altered
Original change's description:
> Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others.
>
> Bug: pdfium:731
> Change-Id: I61d38ab3f2b0ac68b8479ade25bab50f3a73c27b
> Reviewed-on: https://pdfium-review.googlesource.com/9770
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: pdfium:731
Change-Id: Ic66a2641c259173fb3792f7a4206e19ee4707fc9
Reviewed-on: https://pdfium-review.googlesource.com/10150
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Added FPDFImageObj_GetImageDataDecoded() for retrieving the uncompressed
data of an image, and FPDFImageObj_GetImageDataRaw() for retrieving the
raw data of an image.
* Refactored out DecodeStreamMaybeCopyAndReturnLength(), which is
used to decode both attachment data and image data.
* Within DecodeStreamMaybeCopyAndReturnLength(), used a different
decoder function which takes care of multiple filters if exist. As
a result, CPDF_StreamParser::DecodeInlineStream() which was made
static previously is now moved back into namespace.
Bug=pdfium:677
Change-Id: I22a22c99acaca98ef8c15f88911f2646a2c854d5
Reviewed-on: https://pdfium-review.googlesource.com/9811
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|