1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-22 20:25:28 +08:00

Rewrite 04-01

This commit is contained in:
Meow J
2017-06-29 03:25:21 +08:00
parent 4700d284b4
commit 5a3a38108d
9 changed files with 94 additions and 72 deletions

View File

@@ -15,6 +15,7 @@
"""
from PIL import Image
from os.path import splitext
file_name = input("Filename: ")
r, g, b, a = map(int, input("Color(R G B A): ").split())
@@ -32,4 +33,4 @@ for x in range(0, img.size[0]):
if pixel[x, y] == (r, g, b, 255):
img.putpixel((x, y), (0, 0, 0, 0))
img.save('noBG.png')
img.save(splitext(file_name)[0] + '_noBG.png')