Bonjour,

Débutant en python j'essaye de coller une image dans un fond blanc.
J'ai donc lancé cet exemple mais j'obtiens l'erreur : ImportError: No module named 'ImageDraw'

J'ai vu sur d'autre forum que certain utilise "from PIL import Image, ImageDraw" pour faire appelle à ImageDraw mais j'obtiens une autre erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 413, in _getdecoder
    decoder = getattr(core, decoder_name + "_decoder")
AttributeError: 'module' object has no attribute 'zip_decoder'
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "./test.py", line 10, in <module>
    im.paste(into, (0,0,w,h))
  File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 1325, in paste
    im.load()
  File "/usr/local/lib/python3.4/dist-packages/PIL/ImageFile.py", line 200, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/usr/local/lib/python3.4/dist-packages/PIL/Image.py", line 417, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
OSError: decoder zip not available
 
le shell a retourné 1
Quelqu'un a une idée ?