Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

I've been trying to write a script to draw some arcs which fade out to the background colour (see sample below). from PIL import Image, ImageDraw import math import random def draw_concentric_circles(...
Jon Cage's user avatar
  • 37.8k
0 votes
0 answers
117 views

I am running Python 3.12.10 on Visual Studio Code. I am working on a python script that opens a PPT file, takes screenshots of each slide and stores them in a temporary directory file under "C:/...
Zahab's user avatar
  • 13
Advice
1 vote
8 replies
96 views

Our organization has HD images that are over 20 MB in size on a network drive. When trying to preview them, is it possible to have python download a smaller version of them (to reduce bandwidth) with ...
zdanman's user avatar
  • 519
3 votes
2 answers
82 views

I want to make images in Python Pillow with text, insert the images into a Microsoft Word document, and have the font size in the image match the font size in the document. How do I make the font ...
aTree's user avatar
  • 143
0 votes
1 answer
90 views

I would like to know why image flicking while adjust it's brightness during adjustment. here is my script: from nicegui import ui from PIL import Image, ImageEnhance import io, base64 original_image = ...
Mohammad Eftekharian's user avatar
5 votes
1 answer
153 views

I'm attempting to rotate an image in python by copying each individual pixel into a new blank image, (I know, probably not the best way to do it but this is what I have the theoretical knowledge basis ...
Achromatic's user avatar
0 votes
2 answers
89 views

In C/C++, we use libtiff 4.6.0 to parsing TIFF images. We identify the type of TIFF image with: unsigned int PhotoMetric = 0, SamplesPerPixel = 1, BitsPerSample = 1; TIFFGetField(Tiff, ...
Bart Theelen's user avatar
1 vote
1 answer
96 views

I have a TIFF file with a size of (48000, 432000) and I would like to upload only a piece of the image, for example, pass a parameter like (X, Y, wid, hei), where X, Y are the coordinates of the upper-...
senek's user avatar
  • 85
0 votes
2 answers
100 views

main.py from PIL import Image, ImageDraw, ImageFont base_img = Image.new("RGBA", (100, 100), (0, 255, 0)) txt = 'Sample <del color=red>text<del>' rotate = 120 font = ImageFont....
Release24's user avatar
0 votes
0 answers
40 views

Affine transformations (rotations, translations, shears and scales) can be represented (for 2-D arrays of points) as 3x3 matrices. And it is immediately clear, by looking at this matrix, what the ...
VizDracViz's user avatar
0 votes
0 answers
82 views

I have the following code to calculate and visualise the probability of scoring 10 points or more This is the Scoreboard image that I used to run the code from PIL import Image, ImageDraw import ...
Nemo's user avatar
  • 1,306
0 votes
0 answers
92 views

I recently wrote a program which renders the mandelbrot set and encountered some irrelevent issues, which some helpful users solved for me. One user reccommended I change an aspect of my code for ...
Jessica's user avatar
  • 41
3 votes
2 answers
131 views

I am trying to make a python program that can render the mandelbrot set. My full program can output an image of the set, but for some reason, it displays it cut up into opposite facing quarters. This ...
Jessica's user avatar
  • 41
-1 votes
0 answers
35 views

PS C:\Users\ltaye\ecommerce> python manage.py runserver Watching for file changes with StatReloader Performing system checks... Exception in thread django-main-thread: Traceback (most recent call ...
Anas LTAIEF's user avatar
5 votes
2 answers
95 views

Using Python's Pillow (PIL) module I'm trying to shift an image 85 pixels to the right using an affine transform. The below code should to this, but instead shifts the image seemingly in the wrong ...
Christopher Pratt's user avatar
0 votes
1 answer
163 views

I am trying to embed python standalone builds to my electron app. I downloaded standalone from https://github.com/astral-sh/python-build-standalone Everything seems to work fine until pillow is ...
Art's user avatar
  • 3,171
2 votes
1 answer
81 views

I am getting weird behaviour when using PIL, here is my code: main_img = Image.open(image_url) all_colors = main_img.getcolors(maxcolors=100000) when I use this image: everything works perfectly, ...
Aadvik's user avatar
  • 1,522
2 votes
1 answer
93 views

I have code which finds the top 10 colors from an image, so for that I used PIL to find all of the colors and then processed it and found the 10 most common ones, but when I try it online, results are ...
Aadvik's user avatar
  • 1,522
0 votes
1 answer
48 views

I am curious what the PIL library does value scaling and normalization wise to show me crisp image and why just doing matplotlib on the extracted numpy value looks really bad. Here is my code ...
El Dude's user avatar
  • 5,708
1 vote
1 answer
78 views

I have a program which writes text based on the size of the image. If the size is 900x900 (tkinter units) then it will write text on 300x300, 300x600, 600x300 and 600x600, but when I try to write that,...
Aadvik's user avatar
  • 1,522
1 vote
1 answer
81 views

I'm getting this error "Unable to import module 'lambda_function': No module named 'PIL'" when I try to run an AWS lambda that uses PIL. What my current setup involves: I downloaded the ...
Robin's user avatar
  • 21
-2 votes
1 answer
69 views

Why would the object im_test be None for the below code: import io import os from PIL import Image test_image=os.path.join("/content","drive","MyDrive","Colab ...
IPSita's user avatar
  • 1
2 votes
1 answer
142 views

While converting PNG (RGB) to grayscale using two different versions of Pillow and Python, different grayscale values were observed. I used Pillow version 5.4.1 on Python 2.7.18, and Pillow version 11....
Grishan Pradhan's user avatar
-1 votes
1 answer
98 views

I'm trying to export videos programmatically using Moviepy. The code below generates a video from input in the form of audio and image, and adds a zoom-out effect. I'm using this program to generate ...
Dev's user avatar
  • 1
0 votes
1 answer
149 views

I'm trying import xlsx file into odoo (running inside a docker container) containing image url. Some of them is webp and whenever odoo try to import those webp image url, it got error : Traceback (...
Arlème Johnson's user avatar
0 votes
1 answer
132 views

I found this very nice example, how to make an array of frames: https://stackoverflow.com/a/17394994/7489698 But I do not know how to use this in PIL correctly. To demonstrate it, I have sketched this ...
Christof Bodner's user avatar
2 votes
1 answer
86 views

I am working on a camera applicaiton where I need to get images from camera buffer and display it in a TK label live: def display_thread_run(self): while self.is_acquiring: image_data = ...
Anthony's user avatar
  • 3,863
1 vote
1 answer
161 views

I am making sample images using Numpy and Pillow Python libraries. I made 2 images as I describe below: For the first image, I used np.random.randint(0, 255) to make a 3D-array to make the pixels ...
Saber Vatankhah's user avatar
0 votes
0 answers
35 views

I am trying to import matplotlib. I have installed matplotlib through: conda install matplotlib When attempting to import matplotlib as follows: import matplotlib I get the following error: import ...
Mr Phase Locked Loop's user avatar
0 votes
0 answers
61 views

I am making an image converter using pillow in VS Code, but when I run pip install pillow it installs in python 3.10 folder. How to fix it?
Sanek Secunda's user avatar
2 votes
1 answer
171 views

A function I am working on takes a dictionary with some data, plots based on the data to axes of a noninteractive matplotlib figure (so without showing it) and renders that figure to an PIL image that ...
vboettcher's user avatar
0 votes
0 answers
69 views

having a bit of a weird issue in VS Code with Pylance/pillow, whereby the autocomplete doesn't show for PIL when anything inherits PIL. As soon as PIL is used, can no longer get any autocompletes, ...
ybtooly's user avatar
0 votes
1 answer
64 views

I am using XMP tags to perform backup of the original name of my pictures before renaming them. I'm using this command to perform backup (works in Windows): exiftool -P -overwrite_original_in_place &...
liv913's user avatar
  • 127
-1 votes
2 answers
83 views

I have been working on face recognition tool and I have to draw a square on an image. The problem is before the last line cv2.rectangle(photo1.....) because the image is not a cv2 it says I have given ...
Markuss Celms's user avatar
0 votes
1 answer
220 views

I have the following code that creates 60 frames using Pillow in Python 3.11.10 and that I want to use to create a GIF image (repeating endless), with a duration per frame of 0.1 seconds. The first ...
Alex's user avatar
  • 45.1k
-1 votes
2 answers
79 views

Planning on using Tensorflow Lite for image classification. To test the model, using Fashion-MNIST database to create the model following a Tensorflow basic example from their website. Created and ...
gus's user avatar
  • 369
1 vote
1 answer
115 views

I tried to open .img images with PIL/pillow library but it seems like it does not support reading them. What can I do? Link to sample image. from PIL import Image image=Image.open('C:/Users/mkmoh/...
Mohamed Kaab's user avatar
0 votes
1 answer
116 views

I’m working on a Python script to capture screenshots on macOS in a stealthy way using Core Graphics (CGWindowListCreateImage) and PIL (Pillow). However, the screenshots I capture are heavily ...
Jack's user avatar
  • 13
0 votes
0 answers
41 views

I'm trying to open an image at a URL using Pillow, but it only works for some URL. In my code below, URL1 works but not URL2. import requests from PIL import Image url1 = "https://picsum.photos/...
user173729's user avatar
1 vote
0 answers
1k views

first time coding in python and I need to add Pillow to edit some images, yet every time i try to install it I get the same error. This is the only library in which I've had any issue. I'm using a ...
luonn's user avatar
  • 11
1 vote
1 answer
65 views

Python PIL Image not working properly with overlay text image. I am trying to use FPDF image to convert an overlayed text png image to pdf file. However, the overlay text is not in expected colour (...
UserM's user avatar
  • 334
0 votes
3 answers
105 views

Suppose I have an RGB888 image (= 8 bit per color) in which the color of each pixel evenly encodes a (raw) data byte. Scheme: Channel red encodes Bit 7:6 (R: 0-63 = 0b00, 64-127 = 0b01, 128-191 = 0b10,...
Steffen's user avatar
  • 31
0 votes
1 answer
55 views

Getting this issue while saving and writing text over image using python image library. I am trying to write a text over a png image using Pillow imaging library, however after trying previous answers ...
UserM's user avatar
  • 334
0 votes
0 answers
107 views

I’m trying to enable WebP support in Pillow 2.9.0 on CentOS 7. I can only use yum to install packages (I cannot use pip). Here’s what I’ve done so far: Installed libwebp and libwebp-devel using yum: ...
Paul's user avatar
  • 6,837
-1 votes
2 answers
76 views

When I run this code, from original image (blue ring attached), at first show I see circle but after if I convert to RGB and do any manipulation(I tried selecting different columns, etc.), I always ...
Gad11ng's user avatar
  • 43
1 vote
2 answers
101 views

I would like to remove the circle surrounding the retinal blood vessels to keep only the interior. This is the source image where I applied segmentation. I want to remove the large white circle. ...
Nadzer's user avatar
  • 21
1 vote
1 answer
132 views

I'm trying to make a QR code and I'm using pillow=11.1.0. Here's the code to generate and save the QR code: def save(self, *args, **kwargs): ## TODO:Generate QR Code # qr_code_url = f&...
Jacob Mutale's user avatar
1 vote
0 answers
124 views

I am trying to install Pillow library but keep on getting errors. I thought it was some pip install like many others but i can't get rid of this error. Kept on searching on the internet and it turns ...
Pedro Medina's user avatar
0 votes
1 answer
57 views

Input: import numpy as np from PIL import Image with Image.open("testimage.png") as img: img.convert('L') # convert to greyscale #img.convert('1') # convert to B&W ...
Sun Bear's user avatar
  • 8,559
0 votes
0 answers
58 views

I am creating a GUI application that generates certificate based on the user input. The problem arising is that the placement of placeholder text in 900x650 canvas image does not align with the ...
user23369511's user avatar

1
2 3 4 5
203