Skip to content

Instantly share code, notes, and snippets.

@prideout
Created December 2, 2015 22:25
Show Gist options
  • Save prideout/2bb99c88afdb360effb9 to your computer and use it in GitHub Desktop.
Save prideout/2bb99c88afdb360effb9 to your computer and use it in GitHub Desktop.
Python script that extracts red from 3 BPP image and saves as 1 BPP image.
from PIL import Image
im = Image.open("color.png")
im.split()[0].save("gray.png")
@prideout
Copy link
Author

Image.merge('RGB', im.split()[0:3]).save('rgb.png')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment