Pillow
Pillow copied to clipboard
Python Imaging Library (Fork)
Would love to see JBIG/JBG/JBIG2 implemented as supported files. They are relatively simple lossless raster formats (https://en.wikipedia.org/wiki/JBIG), seems like a fun challenge. There is already an opensource C library, made...
### What did you do? Installed a package (matplotlib) with a Pillow dependency on Python 3.15 ### What did you expect to happen? Build on CI **edit** I think what...
**Background** We frequently want to ensure that a given image is in "RGB" mode. To that end, frequently in code `.convert("RGB")` is invoked immediately after opening an image with `Image.open(...)`....
Alternative to https://github.com/python-pillow/Pillow/pull/9309 When `ImagePalette._new_color_index` adds a new color to an indexed-color TIFF, an assertion added in f2302ab716e9e could be tripped. The call into `Image.histogram` could result in `ImageFile.load` being...
https://github.com/python-pillow/Pillow/pull/9070#discussion_r2574705199 suggested checking the subprocess return code in ImageGrab. This PR adds it, following the example of https://github.com/python-pillow/Pillow/blob/b0a5bc2a6b9842648727f8db99ca5c9ee8126779/src/PIL/GifImagePlugin.py#L909-L910 I've also added additional testing, as per https://github.com/python-pillow/Pillow/pull/9070#discussion_r2574705182, including opening a new...
After loading the palette into the C image in `load()`, https://github.com/python-pillow/Pillow/blob/ec40c546d7d38efebcb228745291bd3ba6233196/src/PIL/Image.py#L889-L891 the Python palette may also be updated with what the C image now reports. https://github.com/python-pillow/Pillow/blob/ec40c546d7d38efebcb228745291bd3ba6233196/src/PIL/Image.py#L901-L903 This PR suggests only...
## Main release Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154 * [ ] Develop and prepare...
When splitting an image into multiple bands, https://github.com/python-pillow/Pillow/blob/b33a31524a1d0304ef3322ef2c0c0fa3b39a5296/src/_imaging.c#L2473-L2484 rather than counting failures and continuing, it would simpler to break immediately on failure.
`Image.tobytes()` is used in the [`__array_interface__`](https://github.com/python-pillow/Pillow/blob/d42e537efeb1bd11cd9df1db1c7d7a6dc529d9e2/src/PIL/Image.py#L716-L726) when images are passed to numpy using `np.asarray(...)`. Converting PIL images to numpy is very common, e.g. ML libraries like [vllm](https://github.com/vllm-project/vllm/blob/273690a50ac2a5fa79fa7acc5077e49aa1af427e/vllm/multimodal/hasher.py#L37) or some pytorch...