About 50 results
Open links in new tab
  1. python - ImportError: No module named PIL - Stack Overflow

    from PIL import Image "Pillow is a fork of PIL, the Python Imaging Library, which is no longer maintained. However, to maintain backwards compatibility, the old module name is used." From …

  2. How to show PIL images on the screen? - Stack Overflow

    Sep 24, 2012 · PIL's built-in show() method is the simplest possible version of the "script some other program to show it". (On earlier Windows systems you'd end up with a whole bunch of MSPaint …

  3. How do I resize an image using PIL and maintain its aspect ratio?

    The Python 3 documentation for PIL says that thumbnail only works if the resulting image is smaller than the original one. Because of that I would guess that using resize is the better way.

  4. How do I convert a PIL Image into a NumPy array? - Stack Overflow

    How do I convert a PIL Image back and forth to a NumPy array so that I can do faster pixel-wise transformations than PIL's PixelAccess allows? I can convert it to a NumPy array via: pic = …

  5. python - how to install PIL with pip? - Stack Overflow

    Jul 19, 2021 · Traceback (most recent call last): File "image_viewer.py", line 2, in <module> from PIL import ImageTk, Image ImportError: No module named PIL but I already install Pillow and everything …

  6. How do I open an image from the internet in PIL? - Stack Overflow

    However, the PIL.open function explicitly requires it. Image.open (infile) => image Image.open (infile, mode) => image Opens and identifies the given image file. This is a lazy operation; the actual image …

  7. PIL.UnidentifiedImageError: cannot identify image file

    PIL throws error because it cannot identify the image format. Most probably the reason is that the image is corrupted and hence cannot be read (or "identified") by pillow's Image.open().

  8. python - No module named 'PIL' - Stack Overflow

    Mar 13, 2018 · To fix the issue, I uninstalled PIL and Pillow through sudo pip3 uninstall pillow and sudo apt-get purge python3-pil. I then restarted and then used sudo -H pip3 install pillow to reinstall Pillow …

  9. How to merge a transparent png image with another image using PIL

    from PIL import Image background = Image.open("test1.png") foreground = Image.open("test2.png") background.paste(foreground, (0, 0), foreground) background.show() First parameter to .paste() is …

  10. python - No Module named PIL - Stack Overflow

    Jul 1, 2016 · I know PIL is deprecated, so I installed Pillow instead, and for backward compatibility reason, Pillow is still using PIL as its module name. Here's my pip freeze look like for Pillow: …