Skip to main content
-1 votes
1 answer
42 views

Err in add_item Dataset [closed]

import tkinter.filedialog dir=tkinter.filedialog.askdirectory() files=os.walk(dir) for f1 in files: direct = f1[0].split('\\')[-1] for f in f1[2]: if f.split('.')[-1] == 'jpeg': ...
Pulf's user avatar
  • 11
0 votes
0 answers
33 views

Visual Studio Code not showing autocomplete package list for pillow/Pylance

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
1 vote
1 answer
34 views

Exploring XMP tags

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
  • 129
0 votes
2 answers
61 views

Python CV2 and tkinter canvas

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
55 views

How to create a GIF using pillow and imageio with python?

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 (repeating endless), with a duration per frame of 0.1 seconds. The first 4 frames ...
Alex's user avatar
  • 44.6k
0 votes
2 answers
59 views

Saving and Loading Images for Tensorflow Lite

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
  • 361
-1 votes
0 answers
46 views

How do I recall my function img when it is in a if statement and im making an elif statement under it?

I am trying to make a website that can let you take pictures with your camera and converts that picture into grey and also lets you upload an image that gets converted to grey but the problem is that ...
Adam Idrissi's user avatar
-1 votes
0 answers
22 views

How do I fix this for loop so that it stops creating more boxes when trying to upscale this text font

Hey so I found this code online that is supposed to upscale and change the font of the text in these images enter image description here but everytime I run the code through the terminal the image I ...
Otts486's user avatar
0 votes
0 answers
68 views

PIL UnidentifiedImageError: do PIL support reading .img files? and if not how to read them?

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

How to Capture a Screenshot on macOS Using Core Graphics (CGWindowListCreateImage) with Python and PIL Without Distortion While Staying Stealthy?

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
  • 15
0 votes
0 answers
23 views

PIL.UnidentifiedImageError for some image URL, but not others

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
668 views

Couldn't build wheel for pillow

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
47 views

Python PIL image text overlay not displayed with expected color on white background image (RGB vs RGBA mode)

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
1 vote
3 answers
76 views

How does a Palette work in Python Imaging Library?

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
  • 23
0 votes
1 answer
45 views

Python Image AttributeError: 'ImageDraw' object has no attribute '__array_interface__'

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

15 30 50 per page
1
2 3 4 5
677