Commit Graph

24 Commits (4cebd9f15da790e727680c98bf75bedc0284dac1)

Author SHA1 Message Date
josch 4cebd9f15d Merge branch 'agroszer-py2' into 'master'
fixing a slew of python 2 issues

See merge request !4
5 years ago
Johannes 'josch' Schauer 198c98a5f9
make pep8 compliant 6 years ago
Johannes 'josch' Schauer f5d8d86dff
Also do not re-encode CCITT Group 4 encoded TIFF images
Add additional property of input images: inverted

closes: #47
6 years ago
Johannes 'josch' Schauer 7de174f4b5
CCITTFaxDecode filter must be in an array 6 years ago
Johannes 'josch' Schauer d931f02709
src/tests/__init__.py: handle PNG input images properly 6 years ago
Johannes 'josch' Schauer b99fae1380
src/tests/__init__.py: don't test for color space now that we support palette PNGs 6 years ago
Johannes 'josch' Schauer eaf9de23c9
Filter must not be array for PNG output, so never make it an array 6 years ago
Johannes 'josch' Schauer 3142824bab
src/tests/__init__.py: do not test animation.gif with pdfrw because it doesn't support hexadecimal palette data 6 years ago
James R. Barlow a8269391e9 Implement /UserUnit scaling to support oversized PDFs
The original PDF specification supported a maximum of 200x200" pages or
14400 PDF units. In PDF 1.6 rather than remove this limitation, Adobe
added the /UserUnit field for pages, which allows one to specify the
scaling that should be applied for user-facing numbers, while keeping
the internal limit of 14400 units.

Many real-world designs are larger than 200" in one direction. One
example is tractor feed or rolled paper which may be easier to scan in
one continuous run rather than segment into pages.

/UserUnit is independent of the pixel size and resolution of the image.

/UserUnit can also indicate very small page sizes but this is not
implemented here.
7 years ago
Adam Groszer 0e76a5bd97 fixing a slew of python 2 issues 7 years ago
Stephan Richter b25098c3f0 Python 2 does not automatically convert integers to floats, so we have to be a bit more explicit. 7 years ago
Stephan Richter 18d637ea34 Make sure we are using the correct IO class in Python 2. 7 years ago
Johannes 'josch' Schauer 16993964ce restore pep8 compliance 7 years ago
Johannes 'josch' Schauer 8476e333cd src/tests/__init__.py: add support for multiframe gif tests 7 years ago
Johannes 'josch' Schauer 962d4dbdfb Make pep8 compliant again 7 years ago
James R. Barlow eedf73e73e Add test cases for CCITT G4 8 years ago
Johannes 'josch' Schauer e05d2992e0 src/tests/__init__.py: adapt testcases for last commit 8 years ago
Johannes 'josch' Schauer 27015c1a6e fix testsuite after exception renaming 8 years ago
josch 251238b410 release version 0.2.0 - big rewrite and lots of new features
- now Python3 only
 - pep8 compliant code
 - update my email to josch@mister-muffin.de
 - move from github to gitlab.mister-muffin.de/josch/img2pdf
 - use logging module
 - add extensive test suite
 - ability to read from standard input
 - pdf writer:
      - make more compatible with the interface of pdfrw module
      - print floats which equal to their integer conversion as integer
      - do not print trailing zeroes for floating point numbers
      - print more linebreaks
      - add binary string at beginning of PDF to indicate that the PDF
        contains binary data
      - handle datetime and unicode strings by using utf-16-be encoding
 - new options (see --help for more details):
      - --without-pdfrw
      - --imgsize
      - --border
      - --fit
      - --auto-orient
      - --viewer-panes
      - --viewer-initial-page
      - --viewer-magnification
      - --viewer-page-layout
      - --viewer-fit-window
      - --viewer-center-window
      - --viewer-fullscreen
 - remove short command line options for metadata arguments
8 years ago
josch d5fc324b7b cater for python-pil versions without close() attribute (the 3rd fix) 9 years ago
josch b90e385efe cater for python-pil versions without close() attribute (the 2nd fix) 9 years ago
Jakub Wilk 5d7975164d remove unused imports 9 years ago
josch aabd104114 update tests handling 9 years ago
Stephan Richter db7e74bcfe Added tests for the package. 10 years ago