def flip(self, axis=HORIZONTAL):
if axis == HORIZONTAL:<EOL><INDENT>self.img = self.img.transpose(Image.FLIP_LEFT_RIGHT)<EOL><DEDENT>if axis == VERTICAL:<EOL><INDENT>self.img = self.img.transpose(Image.FLIP_TOP_BOTTOM)<EOL><DEDENT>
Flips the layer, either HORIZONTAL or VERTICAL.