Compute image pixel density without performing rectangle intersection (+5 squashed commits)
Squashed commits: [0e27904] Partially implement DPI calculation with rotation of the image Fixes test suite [a64f662] pageinfo: all tests pass [c5b811a] Fix typos [cdd2286] Can now find inline images for efficiently [60dde8d] First cut at implementing intelligent DPI detection based on content stream Broke many of the test cases
This commit is contained in:
@@ -103,8 +103,8 @@ def test_single_page_image():
|
||||
assert pdfimage['bpc'] == 8
|
||||
|
||||
# DPI in a 1"x1" is the image width
|
||||
assert pdfimage['dpi_w'] == 8
|
||||
assert pdfimage['dpi_h'] == 8
|
||||
assert abs(pdfimage['dpi_w'] - 8) < 1e-5
|
||||
assert abs(pdfimage['dpi_h'] - 8) < 1e-5
|
||||
|
||||
|
||||
def test_single_page_inline_image():
|
||||
@@ -131,4 +131,5 @@ def test_jpeg():
|
||||
|
||||
pdfimage = pdfinfo[0]['images'][0]
|
||||
assert pdfimage['enc'] == 'jpeg'
|
||||
assert (pdfimage['dpi_w'] - 150) < 1e-5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user