python-imaging-library Questions

3

Solved

I wanted to display an image from a NumPy array, but I got this error: Traceback (most recent call last): File "E:/wittos/python/SVM/witti svm/arraytoimage.py", line 14, in <module> imag...
Outstanding asked 29/12, 2018 at 12:18

2

I already tried this: from PIL import Image im = Image.open('this.webp') im.save('that.gif', 'gif', save_all=True) which is giving me this error TypeError: unsupported operand type(s) for &a...
Telangiectasis asked 25/8, 2018 at 10:33

5

Solved

In a new SnowLeopard install, I'd like to use homebrew to install PIL. However the recipe installs PIL under cellar instead of in /Library/Python/2.6/site-packages. Is there a way to change the ins...
Banns asked 5/4, 2011 at 3:26

9

Solved

I am trying to have images in my Tkinter GUI, hence I am using PIL. Image.ANTIALAIS is not working. However, Image.BILINEAR works Here's some sample code: import tkinter as tk from PIL import Ima...
Fantom asked 4/7, 2023 at 21:58

3

Solved

I'm looking for something like PIL (Python Imaging Library), which sadly doesn't support WebP images. I'd like to be able to do resizes and crops. Or at least convert to JPEG and then I can work i...

5

I tried using the pre-built wheels for Pillow and corresponding libraqm DLL from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow But the following returns False: from PIL import features f...
Drown asked 16/7, 2020 at 16:20

6

Solved

I already checked python version on my environment (sublime text) and it is 3.11.0, the latest, I checked pillow version which is 10.0.0, the latest, and my code looks similar to other examples onl...
Frediafredie asked 4/9, 2023 at 13:27

17

Solved

I installed Pillow, and after I want to do: from PIL import Image I get the following error: Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/lo...
Varion asked 16/8, 2014 at 13:37

4

Solved

I've been trying to install the module Pillow on my Mac (running a fresh install of El Capitan and python 3.5) for some time now. Using pip3 install Pillow, I get an error saying that zlib is not f...
Richel asked 2/10, 2015 at 14:25

7

My goal is to read a set of PNG files, create Image(s) with Image.open('filename') and convert them to simple 2D arrays with only 1s and 0s. The PNG is of the format RGBA with mostly only 255 and 0...
Ensphere asked 18/9, 2016 at 6:5

5

Basically what I want to do is take a file, bring its binary data(decimal of course) into an list and then generate a grayscale bitmap image using PIL based on that list. For example if the file i...
Closemouthed asked 26/5, 2012 at 3:7

2

I am using Python's image processing libraries to render images of characters using different fonts. Here's a snippet of the code that I'm using to iterate through a list of fonts and a list of ch...
Germano asked 23/12, 2017 at 0:41

2

Solved

I have pixel data that I want to use to create a new .tif image that has multiple frames. How would I go about doing this? I have tried python PIL however I have only found it supports multiple fra...
Guadalajara asked 23/10, 2013 at 14:29

6

Solved

I have a script that requires PIL to run. Other than downgrading my Python, I couldn't find anyway to install PIL on my Python 3.6 Here are my attempts: pip install pil Collecting pil Could not ...
Incisor asked 27/8, 2016 at 10:13

7

I am taking a jpg image and using numpy's fft2 to create/save a new image. However it throws this error "IOError: cannot write mode F as JPEG" Is there an issue with CMYK and JPEG files in PIL...
Goat asked 23/5, 2013 at 17:52

4

I am trying to run a Python program with pyautogui but there's a problem because it is telling me that Pillow is not installed. I tried to install it or upgrade it with commands such as pip install...
Sparoid asked 4/9, 2022 at 10:21

2

Solved

I want to know how can I draw text like this check image As you can see text is on a green image and text has pink color background My code, this is part of my code I'm using PIL draw = ImageDraw...
Yaroslavl asked 15/5, 2022 at 17:29

4

Solved

I use PIL to open AREA files from NOAA on a regular basis. In the last batch of images I received, the image.open() command simply does not work. Here is a simple code I wrote which yields the same...
Spousal asked 30/7, 2012 at 18:41

4

Solved

I got a square logo and I need to round_corner it, searched for a while and got the follow code "working": def round_corner_jpg(image, radius): """generate round corner for image""" mask = Image...
Circumbendibus asked 2/7, 2012 at 3:9

5

Solved

I am probably looking for the wrong thing in the handbook, but I am looking to take an image object and expand it without resizing (stretching/squishing) the original image. Toy example: imagine ...
Weasand asked 15/10, 2009 at 14:23

8

I am using the Pillow fork of PIL and keep receiving the error OSError: cannot identify image file <_io.BytesIO object at 0x103a47468> when trying to open an image. I am using virtualenv w...
Forgetmenot asked 26/6, 2015 at 15:49

5

Solved

I am trying to generate a word cloud using the WordCloud module in Python, however I see the following error whenever I call .generate Traceback (most recent call last): File "/mnt/6db3226b-5...
Unrefined asked 28/4, 2023 at 12:16

19

I'm attempting to write a program that places text onto an image, I'm trying to get my head round PIL and have run into the error: OSError: cannot open resource. This is my first python program so ...
Ungraceful asked 7/12, 2017 at 11:46

4

How can I decrease the letter spacing of this text? I want to make the text more squished together by a few pixels. I'm trying to make a transparent image, with text on it, that I want pushed tog...
Mooneye asked 28/3, 2018 at 9:3

7

Solved

I'm trying to render some text using PIL, but the result that comes out is, frankly, crap. For example, here's some text I wrote in Photoshop: and what comes out of PIL: As you can see, the ...
Dickerson asked 24/3, 2011 at 4:7

© 2022 - 2024 — McMap. All rights reserved.