Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created April 8, 2011 14:20
Show Gist options
  • Select an option

  • Save revolunet/909931 to your computer and use it in GitHub Desktop.

Select an option

Save revolunet/909931 to your computer and use it in GitHub Desktop.
merge PNGS with alpha channel with PIL
# -*- encoding: UTF-8 -*-
from PIL import Image
import ImageOps
IN = 'bianchi.png'
EKTA = 'ekta.png'
image = Image.open( IN )
ekta = Image.open( EKTA )
image.paste(ekta, (0,0), ekta)
image.save('output.png' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment