When you think 'RBG' instead of 'RGB' while doing a Hexcodle puzzle
When you think 'RBG' instead of 'RGB' while doing a Hexcodle puzzle
Her name is very memorable. Unless I'm careful, I will mix up the acronyms.
Assuming I did this correctly, here is the image source and the code I used:
from PIL import Image img = Image.open('image.bmp') img = img.convert('RGB') new_img = Image.new('RGB', img.size) for x in range(img.width): for y in range(img.height): r, g, b = img.getpixel((x, y)) new_img.putpixel((x, y), (r, b, g)) new_img.save('flipped_image.png')
What I find incredible here is how little this change actually affects the picture to the human eye.