def load(self, filepath: str) -> bool: filepath = Path(filepath) if filepath.suffix == ".raw": data = Image.load(filepath) self.image_layer = ImageLayer(data) if filepath.suffix == ".msk": data = BitMask.load(filepath) self.overlay_layer = BitMaskLayer(data) self.draw()