Skip to content

Conversation

@radarhere
Copy link
Member

Access.c currently allows you to access data in I;32L and I;32B image modes.

ADD("I;32L", get_pixel_32L, put_pixel_32L);
ADD("I;32B", get_pixel_32B, put_pixel_32B);

However, the only other place these modes (not rawmodes) exist is in ImageMode.py, so this access serves no purpose.

In simpler terms, you can't create an image in these modes, so we never need to access pixel data in them.

>>> from PIL import Image
>>> Image.new("I;32B", (1, 1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "PIL/Image.py", line 3101, in new
    return im._new(core.fill(mode, size, color))
ValueError: unrecognized image mode
>>> Image.new("I;32L", (1, 1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "PIL/Image.py", line 3101, in new
    return im._new(core.fill(mode, size, color))
ValueError: unrecognized image mode

@hugovk hugovk merged commit 1e5237a into python-pillow:main Oct 15, 2025
53 checks passed
@radarhere radarhere deleted the i32 branch October 15, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants