def export(self, filename):
self.flatten()<EOL>self.layers[<NUM_LIT:1>].img.save(filename)<EOL>return filename<EOL>
Exports the flattened canvas.

        Flattens the canvas.
        PNG retains the alpha channel information.
        Other possibilities are JPEG and GIF.