-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
What did you do?
I'm trying to read RGBA image from Windows clipboard, and convert the image to RGB format with a white background. The RGBA image was copyed from chrome browser.
What did you expect to happen?
The returned image from ImageGrab.grabclipboard() should be in RGBA mode.
What actually happened?
The returned image from ImageGrab.grabclipboard() is already in RGB mode, with black background.
What are your OS, Python and Pillow versions?
- OS: Windows 10
- Python: 3.6.8
- Pillow: 7.0.0
new_image = ImageGrab.grabclipboard()
new_image_converted = Image.new("RGB", new_image.size, (255, 255, 255))
new_image_converted.paste(new_image)