Browse Source

Corrected paste for png files.

master
Alexander Demidov 11 years ago
parent
commit
958e377a87
  1. 2
      paste.py

2
paste.py

@ -15,7 +15,7 @@ try:
im = Image.open(infile)
im_watermark = Image.open(watermark)
im = im.convert()
im.paste(im_watermark, (im.size[0] // 2 - im_watermark.size[0] // 2, im.size[1] // 2 - im_watermark.size[1] // 2))
im.paste(im_watermark, (im.size[0] // 2 - im_watermark.size[0] // 2, im.size[1] // 2 - im_watermark.size[1] // 2), im_watermark)
im.save(infile, "JPEG", quality=100)
except IOError:
print("cannot create thumbnail for '%s'" % infile)
Loading…
Cancel
Save