Skip to content

Instantly share code, notes, and snippets.

@laurencee9
Created June 26, 2018 15:08
Show Gist options
  • Save laurencee9/cb5f3d19e8f823e4906e2da9255d44dc to your computer and use it in GitHub Desktop.
Save laurencee9/cb5f3d19e8f823e4906e2da9255d44dc to your computer and use it in GitHub Desktop.
Convert an image to RGB file
from PIL import Image
def remove_alpha(image_path):
Image.open(image_path).convert('RGB').save(image_path+"rgb.jpg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment