Constructing Images fromarray/buffer in Greyscale vs. Palettized #6561
-
I'm noticing in Pillow 9.2.0 that fromarray et al with P mode create a palette and attach it to the image, which does not happen when the buffer is loaded as L. This makes P much slower than L to load even when the default palette is immediately overwritten by putpalette (and it's thus highly recommended to load as L and then use putpalette). If this hasn't already been changed since then I'd suggest either
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Could we get a code example to demonstrate the speed difference?
Let us know if you mean that this speed difference just started in 9.2.0. I suspect you don't mean that. |
Beta Was this translation helpful? Give feedback.
#6567 has now been merged.