def METHOD_NAME(self):
    if self.image is not None:
        self.image.close()
        self.image = None
    if self.alphamap_image is not None:
        self.alphamap_image.close()
        self.alphamap_image = None