do not allow to save images discarding alpha channel
The problem here is that it's liable to break thumbnailing scripts that read PNGs, and this behavior dates from the PIL fork. (so it's well established). We'd be replacing something that does questionable things to the alpha channel with an exception.
PNG have 16 base color formats. 6 of them fails PNG → JPEG conversation on master:
from PIL import Image
for fn in glob('../i/basn*.png'):
Image.open(fn).save(fn + '.jpg')
print '>>>', fn
We can leave the alpha channel discarding for now, but I afraid this means that we leave it forever.
We can make it a specific deprecation warning, and anyone who wants to can register that as an exception. Then we can switch it over in 2-4 releases. (probably after stretch freezes, or April '17)
Ok, I'll add warning then.
Sorry, what is stretch freezes?
Debian Stretch, the next stable release. I'm leaning to include a deprecation warning in one iteration of Debian stable before making a hard error.
Ok, caught your point.
return implicit RGBA to JPEG save, raise warning
Turned the error to the warning.
This should probably get a release note as a future deprecation warning.