Install
pip install PillowImport
from PIL import ImageUsage
from PIL import Image image = Image.open('Ch06/6-2節/sample_image/flower.jpg') image.show()
from PIL import Image image = Image.open('Ch06/6-2節/sample_image/flower.jpg') r, g, b = image.split() convert_image = Image.merge("RGB", (b, g, r)) convert_image.show() convert_image.save('Ch06/6-2節/sample_image/rgb_to_bgr.jpg') image.show()