James R. Barlow
e877d37ac8
--rotate-pages: Only apply rotation if we're reasonable confident
...
Take the threshold from tesseract's default value for -psm 1.
2016-04-14 13:49:44 -07:00
James R. Barlow
8ddd67d1e2
Check encoding of inline images
2016-03-24 15:11:10 -07:00
James R. Barlow
2d3b1ebf6e
Simplify DPI calculation with algebraic derivation
...
Needs testing
2016-03-20 12:35:41 -07:00
James R. Barlow
94a3e447cc
Add otsu threshold to leptonica
2016-03-12 00:09:20 -08:00
James R. Barlow
322085933b
unpaper: fix check for missing and old versions, add test case
2016-03-10 15:37:09 -08:00
James R. Barlow
8c877482bd
Fix leptonica initializers
2016-03-02 06:26:25 -08:00
James R. Barlow
b17d589e84
Don't set -sOutputICCProfile
...
Ghostscript dev advised against. It appears that this is for
creating target for a device that colors in a particular format.
2016-03-02 06:25:34 -08:00
James R. Barlow
3d0e8c9629
Provide our own sRGB profile instead of Ghostscript's
2016-03-01 01:27:40 -08:00
James R. Barlow
0360f078de
get_postscript_icc_path: don't check the same path multiple times
2016-02-29 12:45:58 -08:00
James R. Barlow
6a380ee99c
Fix temporary file placed in wrong folder
2016-02-27 00:51:47 -08:00
James R. Barlow
3c90bd96a9
Remove extraneous debug print() messages
2016-02-27 00:50:58 -08:00
James R. Barlow
570bbe9a05
Add comments and remove debugging, improve inline handling
...
Squashed commits:
[bfff3c9] pageinfo, have a main()
2016-02-27 00:18:36 -08:00
James R. Barlow
5cc3adb39a
Add support for inline images
2016-02-27 00:18:36 -08:00
James R. Barlow
3957a0606c
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
2016-02-27 00:18:36 -08:00
James R. Barlow
dad2198394
Log information about detected page orientations in a summary line
2016-02-26 01:07:59 -08:00
James R. Barlow
e40fdc502d
Always dump stack trace for unexpected errors
2016-02-26 01:06:59 -08:00
James R. Barlow
d446fe5922
Fix "too few characters" reported as error by tesseract -psm 0
2016-02-21 08:53:34 -08:00
James R. Barlow
8246cc0538
Gracefully recover from tesseract's failure to process very large images
...
And test cases to check this
2016-02-20 04:53:23 -08:00
James R. Barlow
ecc0ac9b19
Fix error on --tesseract-timeout timing out
2016-02-20 03:13:23 -08:00
James R. Barlow
ea4e6bf67d
leptonica: serialization tweaks, memory handling
2016-02-20 02:54:53 -08:00
James R. Barlow
46c204f533
Fix leptonica pickling
2016-02-20 02:35:34 -08:00
James R. Barlow
71fbda8bf6
Adjust page orientation parsing to deal with change in Tess 3.04.01
2016-02-20 01:32:56 -08:00
James R. Barlow
9b79b4a7c8
Leptonica: documentation, helper functions
2016-02-20 01:20:06 -08:00
James R. Barlow
c04cc853d7
leptonica: remove special PNM handling
...
We no longer use PNM as an intermediate format, so there's no need to
handle leptonica's PNM quirks.
2016-02-19 15:13:14 -08:00
James R. Barlow
dd41e70ccc
leptonica: nit
2016-02-19 15:11:48 -08:00
James R. Barlow
ab0e5fa425
Improve error checking for tesseract -psm 0 (orientation) errors
2016-02-19 03:58:39 -08:00
James R. Barlow
f3b0434a87
Improve ability to capture error messages from tesseract on a crash
2016-02-19 03:48:49 -08:00
James R. Barlow
3b98a1a04b
Fix KeyError on unexpected tess output
2016-02-17 06:05:27 -08:00
James R. Barlow
d4ef3411e0
Suppress --pdf-renderer tesseract warning in Docker image
...
Since the corrected font is provided in the Docker image, there's no
reason to show the warning.
2016-02-17 01:03:20 -08:00
James R. Barlow
60b2eb1455
Fix JPEG DPI: Pillow expects dpi=(x,y)
2016-02-16 07:29:20 -08:00
James R. Barlow
ab3c1988c1
Work around Leptonica < 1.72 bug that breaks Travis
2016-02-16 07:03:50 -08:00
James R. Barlow
ee5223eea8
Travis again: are invalid correlation measurements a use-after-free?
...
Try explicitly casting the value to a float.
2016-02-16 06:09:48 -08:00
James R. Barlow
71e493a810
Fix case of JPEG missing DPI field
2016-02-16 05:29:32 -08:00
James R. Barlow
d70ce61cfd
Travis: maybe it's just the missing __init__.py?
2016-02-16 05:09:12 -08:00
James R. Barlow
8cd84afac8
Revert "Try moving leptonica build script, playing with wheels a bit"
...
This reverts commit ec2c6c312b .
2016-02-16 05:04:20 -08:00
James R. Barlow
ec2c6c312b
Try moving leptonica build script, playing with wheels a bit
2016-02-16 04:05:58 -08:00
James R. Barlow
c50e3f1329
Complain about older tesseracts that don't have sharp2.ttf installed
2016-02-15 16:43:41 -08:00
James R. Barlow
7c691c21ab
Fix image layer rotation for pages with nonzero crop boxes
2016-02-10 17:48:33 -08:00
James R. Barlow
4ec51729d8
Partial fix for images not anchored to (0, 0)
2016-02-10 17:14:48 -08:00
James R. Barlow
07b41e479a
Cleaner access to mediabox
2016-02-09 02:19:05 -08:00
James R. Barlow
6510bcad19
DPI information not transferred automatically from PNG to JPEG
2016-02-09 02:18:54 -08:00
James R. Barlow
1928a64cae
Better logging output for autorotation
2016-02-08 23:42:25 -08:00
James R. Barlow
11e575a5a3
leptonica: suppress debug output
2016-02-08 23:41:45 -08:00
James R. Barlow
7fbc0d6460
tesseract: unify logging function
2016-02-08 23:40:36 -08:00
James R. Barlow
1ba8b1aa4b
unpaper is lousy at deskewing, so let leptonica do it
2016-02-08 15:26:33 -08:00
James R. Barlow
4ceb59215f
Leptonica: classes are better
2016-02-08 15:14:44 -08:00
James R. Barlow
2e6879ee51
Introduce Leptonica class for Pix
2016-02-08 14:52:01 -08:00
James R. Barlow
66fc2e9d7d
Add rotate 180 correlation sanity check
2016-02-08 13:10:11 -08:00
James R. Barlow
78c3bf5dba
Check autorotate using leptonica correlation
2016-02-08 12:55:50 -08:00
James R. Barlow
2752bda80b
Merge branch 'feature/leptdeskew' into feature/logging
...
Need leptonica for testing now, I think
# Conflicts:
# ocrmypdf/tesseract.py
# requirements.txt
# setup.py
2016-02-08 12:34:48 -08:00