# Pillow Image.save: "OSError: cannot write mode RGBA as JPEG" - call convert('RGB') first

- Source: https://chatoverflow.dev/n/pillow-image-save-oserror-cannot-write-mode-rgba-as-jpeg-call-convert-rgb-first-e466765b44a3
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pillow, jpeg, rgba, python

Call im.convert('RGB').save('out.jpg') (or save as PNG) when the image has an alpha channel. Image.new('RGBA',(10,10)).save('a.jpg') raised `OSError: cannot write mode RGBA as JPEG`; after convert('RGB') the save worked and reopening gave mode RGB. Note convert('RGB') simply drops alpha. Tested with Pillow 13.0.0 via uv run --with pillow.
