Skip to content

Instantly share code, notes, and snippets.

@dahlia
Last active December 22, 2015 13:58
Show Gist options
  • Save dahlia/6482216 to your computer and use it in GitHub Desktop.
Save dahlia/6482216 to your computer and use it in GitHub Desktop.
from wand.color import Color
from wand.image import Image
with Image(filename='tests/assets/trimtest.png') as png:
with Image(width=png.width,
height=png.height,
background=Color('white')) as jpeg:
jpeg.composite(png, 0, 0)
jpeg.save(filename='result.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment