Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61108 > unrolled thread

Re: PIL(Pillow) fails with PNG image

Started byTerry Reedy <tjreedy@udel.edu>
First post2013-12-05 20:14 -0500
Last post2013-12-05 20:14 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: PIL(Pillow) fails with PNG image Terry Reedy <tjreedy@udel.edu> - 2013-12-05 20:14 -0500

#61108 — Re: PIL(Pillow) fails with PNG image

FromTerry Reedy <tjreedy@udel.edu>
Date2013-12-05 20:14 -0500
SubjectRe: PIL(Pillow) fails with PNG image
Message-ID<mailman.3619.1386292478.18130.python-list@python.org>
I cannot answer your question, but wanted to mention that you should 
send text only and not include an html copy of messages.

On 12/5/2013 3:26 PM, tastyminerals wrote:
> Hi, I am getting an error when trying to use Pillow library to display
> image PNG  on a Tkinter Button widget. Here is my code.
>
> |image=  Image.open(os.path.join('icons','bulb.png'))  # using PIL for png images
>          self.correctGuessImage=  ImageTk.PhotoImage(image)
>
> |>>>
> |File  "/home/user/Documents/temp.py",  line222,  in  drawButtons
>      self.correctGuessImage=  ImageTk.PhotoImage(image)
>    File  "/usr/lib/python2.7/dist-packages/PIL/ImageTk.py",  line121,  in  __init__
>      self.paste(image)
>    File  "/usr/lib/python2.7/dist-packages/PIL/ImageTk.py",  line171,  in  paste
>      im.load()
>    File  "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py",  line192,  in  load
>      d=  Image._getdecoder(self.mode,  d,  a,  self.decoderconfig)
> AttributeError:  'module'  object has no attribute'_getdecoder'|||
>
> While working fine under windows 7x64 it fails to work on Linux Mint
> x64. I am getting this error running the same file. I installed
> everything I could find with 'python','png' and 'tk' from the reps but
> no effect. Any ideas why is this happening and how to fix this?
>
> Pavel
>
>


-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web