DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldn’t understand what to do instead :(
And the plot thickens:
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses this)
DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldn’t understand what to do instead :(
And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)
#Pillow #PIL #Python
On Image.fromarray()
:
DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15)
img1 = PIL.Image.fromarray(my_array, mode="RGB")
So I went to see the documentation:
https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray
And came out empty handed, that is, couldn’t understand what to do instead :(
And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):
https://github.com/python-pillow/Pillow/pull/9063
(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)