mdbloice / Augmentor

Image augmentation library in Python for machine learning.
https://augmentor.readthedocs.io/en/stable
MIT License
5.08k stars 866 forks source link

OSError: cannot write mode RGBA as JPEG #237

Closed ccl-private closed 3 years ago

ccl-private commented 3 years ago

image

ccl-private commented 3 years ago

After I read and rewrite all the images into .jpg files use OpenCV. The problem was solved. Maybe PIL does not have the ability to handle RGBA images by default set.

mdbloice commented 3 years ago

After I read and rewrite all the images into .jpg files use OpenCV. The problem was solved. Maybe PIL does not have the ability to handle RGBA images by default set.

I will look in to this. Other functions support RGBA, and the random_erasing() function should also work with RGBA images, so I will have a look and see if I can fix this.