More Reader/Writer coordination errors
These are similar in nature to Issue #103 (closed):
- When a
Reader
object opens an image with color type 3 and a method likeasRGB
is called, it addsinfo["colormap"] = False
, but doesn't touchinfo["palette"]
at all. Meanwhile,Writer(**info)
ignorescolormap
entirely and just checks if it received a palette. This results in an error either in the constructor (if there's an alpha channel) or in thewrite
method (each row has more values than expected). - When a
Reader
object translates atRNS
chunk to an alpha channel, it addsinfo["alpha"] = True
, but doesn't clearinfo["transparent"]
.Writer(**info)
will raise an exception as a result.
Example session in interactive mode to demonstrate these issues: shell_session.py (Note: To avoid potentially doxxing myself, i did edit this slightly. It should still be valid, but i haven't re-tested, so you should verify on your end.)
(Also worth noting is that the errors printed the exception type twice.)