import numpy as np
from PIL import Imageimg=Image.open('222.png')
img1=np.flip(img, axis=2)#翻转rgb中的r和bimg2=Image.fromarray(img1)
img2.show()
源222.png
结果:
import numpy as np
from PIL import Imageimg=Image.open('222.png')
img1=np.flip(img, axis=2)#翻转rgb中的r和bimg2=Image.fromarray(img1)
img2.show()
源222.png
结果: