-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
When an Image object is using palette, calling method Image.save() and Image.show() modifies Image.palette and Image.palette.save() throws an exception ValueError: palette contains raw palette data. The figure below shows the code and the exception. Please take a look at lines that commented out and the console output number 768.
After uncommenting the show() method, the exception disappeared, and the length of palette.palette was still 768.

But when I only use the save() method and comment out the show() method, the length will be 600, as I specified colors=200 before.

I don't think a show() or save() method should modify the origin object, and I also think the palette of a converted palette picture should be able to save its palette directly, without saving or taking a glance at first.
