def invert(self):
alpha = self.img.split()[<NUM_LIT:3>]<EOL>self.img = self.img.convert("<STR_LIT>")<EOL>self.img = ImageOps.invert(self.img)<EOL>self.img = self.img.convert("<STR_LIT>")<EOL>self.img.putalpha(alpha)<EOL>
Inverts the layer.