This commit is contained in:
2024-10-13 21:47:23 +02:00
parent 5d1ec4f974
commit 084b66fe0e
5 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from PIL import Image
# Open the image
image = Image.open('alles_mit_flag.bmp')
# Split the image into Red, Green, and Blue channels
red, green, blue = image.split()
# Save each channel as a separate grayscale image
red.save('red_channel.bmp')
green.save('green_channel.bmp')
blue.save('blue_channel.bmp')
# Optionally, show the images
red.show()
green.show()
blue.show()