Add helper to calculate sizes of PDF thumbnails
Add a method to calculate the size of a thumbnail image in device pixels using the dimensions of the PDF page and the intended device to pixel ratio. Thumbnail images are raw RGBA bitmaps with their sizes capped at a maximum of 255KiB; their pixel dimensions are also bound to that limit. However, the aspect ratio of thumbnails will always be as close as possible to that of its corresponding PDF page. Bug: 652400 Change-Id: I1866f52e1eb1835d921e5653c76fc98d68d77f9c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2378387 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Reviewed-by:
K. Moon <kmoon@chromium.org> Cr-Commit-Position: refs/heads/master@{#804272}
Showing
pdf/thumbnail_unittest.cc
0 → 100644
Please register or sign in to comment