Bug report #9899
decoder jpeg not availalble
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18414 |
Description
OS: Windows 7 Enterprise SP1 64bit
QGIS: default installation http://qgis.org/downloads/QGIS-OSGeo4W-2.2.0-1-Setup-x86_64.exe
I'm writing a plugin to handle images using PIL, used the code below in the Python Console, which raises error "decoder jpeg not available". This also happens on another machine with http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe installed. How can i get PIL to work with JPEG, PNG, PDF and other formats/encoders?
import Image
image = Image.open("R:\\ScannedDocuments\\testimage.jpg")
image.save("R:\\ScannedDocuments\\testimage.tiff", "TIFF")
The following messages are produced, in essence complaining about a jpeg decoder not being available.
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "J:/ScannedDocuments/ImageHandling.py", line 3, in <module>
image.save("R:\\ScannedDocuments\\testimage.tiff", "TIFF")
File "C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\PIL\\Image.py", line 1406, in save
self.load()
File "C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\PIL\\ImageFile.py", line 189, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\PIL\\Image.py", line 385, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
History
#1 Updated by Jürgen Fischer over 10 years ago
- Resolution set to wontfix
- Status changed from Open to Closed
Not a QGIS issue. QGIS doesn't use PIL - it's just there because GRASS uses it.