About 53 results
Open links in new tab
  1. 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 …

  2. python - Open PIL image from byte file - Stack Overflow

    Oct 2, 2015 · Open PIL image from byte file Asked 10 years, 3 months ago Modified 7 years, 8 months ago Viewed 253k times

  3. 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 = …

  4. python - Getting list of pixel values from PIL - Stack Overflow

    Dec 21, 2022 · Problem seems to be the conversion to a standard python list. If I call just pixels=im.getdata() (which returns a special, simplified, list type) everything is fine. If I add the …

  5. python - How can I save an image with PIL? - Stack Overflow

    Jan 22, 2013 · I have just done some image processing using the Python image library (PIL) using a post I found earlier to perform fourier transforms of images and I can't get the save function …

  6. Get Image size WITHOUT loading image into memory

    from PIL import Image im = Image.open(image_filename) width, height = im.size However, I would like to get the image width and height without having to load the image in memory. Is …

  7. python - How to read a raw image using PIL? - Stack Overflow

    Image.frombuffer (mode, size, data) => image (New in PIL 1.1.4). Creates an image memory from pixel data in a string or buffer object, using the standard "raw" decoder. For some modes, the …

  8. python - Does PIL image.convert ("RGB") convert images to sRGB …

    May 31, 2018 · By default PIL is agnostic about color spaces (like sRGB and Adobe RGB). As you might know, RGB is simply three 8-bit values for red, green and blue. CMYK is four 8-bit …

  9. How do I install PIL/Pillow for Python 3.6? - Stack Overflow

    Aug 27, 2016 · In Windows 10 for those struggling to install PIL/pillow while coding on PyCharm and have Python 3.10.6 proceed as follows; Close PyCharm IDE Open and Run CMD.exe …

  10. Using PIL to turn a RGB image into a pure black and white image

    Mar 22, 2017 · From the PIL documentation: """When converting to a bilevel image (mode "1"), the source image is first converted to black and white. Resulting values larger than 127 are …