### Bug summary The `'mode'` parameter from `Image.fromarray` [has been deprecated](https://pillow.readthedocs.io/en/stable/deprecations.html#image-fromarray-mode-parameter), which is used in matplotlib to plot figures using the tkinter backend. ### Code for reproduction ```Python # python -Wd import matplotlib from matplotlib import pyplot matplotlib.use("tkagg") pyplot.subplots() ``` ### Actual outcome ``` DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) ``` ### Expected outcome No deprecation warning ### Additional information _No response_ ### Operating system Ubuntu (this bug is also present on Windows) ### Matplotlib Version 3.10.3 (pillow==11.3.0) ### Matplotlib Backend TkAgg ### Python version Python 3.12.4 ### Jupyter version _No response_ ### Installation None