Commit Graph

7 Commits

Author SHA1 Message Date
Sylvain Pelissier 1273824c0f Add CCITTFax Decode and JPEG test 2016-01-21 13:42:17 +01:00
Sylvain Pelissier 7bc62cd896 PDF extraction error handling 2016-01-13 09:16:56 +01:00
Matt Wilkie eeb2b659aa Fails with "ValueError: not enough image data"
```
> python pdf-image-extractor.py ..\PDF_Samples\GeoBase_NHNC1_Data_Model_UML_EN.pdf
Traceback (most recent call last):
  File "pdf-image-extractor.py", line 33, in <module>
    img = Image.frombytes(mode, size, data)
  File "C:\Python27\ArcGIS10.3\lib\site-packages\PIL\Image.py", line 2047, in frombytes
    im.frombytes(data, decoder_name, args)
  File "C:\Python27\ArcGIS10.3\lib\site-packages\PIL\Image.py", line 731, in frombytes
    raise ValueError("not enough image data")
ValueError: not enough image data
```

Source:
http://ftp2.cits.rncan.gc.ca/pub/geobase/official/nhn_rhn/doc/

"""
All distributed data are subject to the Open Government Licence – Canada.

Canada grants to the licensee a non-exclusive, fully paid, royalty-free
right and licence to exercise all intellectual property rights in the
data. This includes the right to use, incorporate, sublicense (with
further right of sublicensing), modify, improve, further develop, and
distribute the Data; and to manufacture or distribute derivative
products.

-- http://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/free-data-geogratis/licence/17285
"""
2016-01-06 11:40:14 -08:00
Sylvain Pelissier 7b591a285d JPEG sample 2015-12-05 11:44:08 +01:00
Matthew Stamy 5a359fb142 AutoCad bugfix, minor name corrections 2013-11-13 16:49:57 -06:00
Matthew Stamy 9bf0e2112a bugfixes, shortened large example form to a single page 2013-11-06 17:29:53 -06:00
Matthew Stamy ed0646e081 Sample Folder for PDFs 2013-10-08 17:37:55 -05:00