Issue #28 new

self.load() call twice in palette mode

Daniel Oelschlegel
created an issue

In convert function from image.py should the call self.load() in a else branch because if the mode is equal pallete, self.load() is called once again. I don't think this is really necessary.

 def convert(self, mode=None, data=None, dither=None,
                palette=WEB, colors=256):
        "Convert to other pixel format"

        if not mode:
            # determine default mode
            if self.mode == "P":
                self.load()
                if self.palette:
                    mode = self.palette.mode
                else:
                    mode = "RGB"
            else:
                return self.copy()

        else: #altered
            self.load()
...

Comments (0)

  1. Log in to comment