Andrew Murray

Results 159 issues of Andrew Murray

https://github.com/python-pillow/Pillow/pull/9318 upgraded zizmor to include https://docs.zizmor.sh/audits/#obfuscation > The CMD shell has no formal grammar, making it impossible to accurately analyze for security issues. This PR allows for that by 1....

Windows

#9261 reports that pyright has a problem when iterating over the core Imaging instance returned from `im.getdata()`. There is already a comment in our codebase that returning a core Imaging...

Deprecation

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...

Screen grab

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...

Palette

## 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...

Release

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.

Cleanup

While checking for BCn overflow, `dst` is advanced by 8 bytes every loop. https://github.com/python-pillow/Pillow/blob/d07aa6fd17d356b8f09f89a5c485fc8b1532635f/src/libImaging/BcnEncode.c#L287 It is advanced by an additional 8 bytes under these conditions in the [code](https://github.com/python-pillow/Pillow/blob/d07aa6fd17d356b8f09f89a5c485fc8b1532635f/src/libImaging/BcnEncode.c#L265-L284). ```c if...

**Description / Steps to reproduce the issue** installing gcc and python-pip, I created the following Python script, along with an empty file called demo.c in the current directory ```python from...