I have an image where the colors are BGR. How can I transform my PIL image to swap the B and R elements of each pixel in an efficient manner?
I know it's an old question, but I had the same problem and solved it with:
img = img[:,:,::-1]
2.1m questions
2.1m answers
60 comments
57.0k users