def standardize_alpha(psd_image: PSDImage) -> Image: image = psd_image.composite() width, height = image.size for x in range(width): for y in range(height): _, _, _, a = image.getpixel((x, y)) if a == 0: image.putpixel((x, y), (0, 0, 0, 0)) return image