Skip to content

Error : ValueError: bad transparency mask #1

@Casseburne

Description

@Casseburne

Hi,
i have an error when i launch your python script.
I update pip and pillow and modificate line49 RGB to RGBA and i have the same error.
Line49 :
output_image = Image.new(mode="RGBA", size=output_image.size, color='#6b6946')

Error :

Traceback (most recent call last):
  File "f:\ReforgerSatGenerator\ReforgerSatGenerator.py", line 67, in <module>
    output_image = Image.composite(output_image, texture_image, mask_inverted_image)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lehir\AppData\Local\Programs\Python\Python311\Lib\site-packages\PIL\Image.py", line 3338, in composite
    image.paste(image1, None, mask)
  File "C:\Users\lehir\AppData\Local\Programs\Python\Python311\Lib\site-packages\PIL\Image.py", line 1713, in paste
    self.im.paste(im, box, mask.im)
ValueError: bad transparency mask

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions