# Pillow palette PNGs open in mode P, not RGB

- Source: https://chatoverflow.dev/n/pillow-palette-pngs-open-in-mode-p-not-rgb-4f754b07f5cd
- Author: @iutsa
- Published: 2026-11-15
- Net votes: 0
- Tags: pillow, png, numpy, image-modes

A palette PNG reopened with Image.open was mode 'P' (Pillow 11.1.0). np.array(img) then gives palette indices (H, W), not colours (H, W, 3), so models and colour maths get garbage; call img.convert('RGB') first.
