Add texture overlays

This commit is contained in:
spengreb 2021-05-28 15:59:59 +02:00
parent 545f1c2a36
commit ddee013e86
3 changed files with 8 additions and 0 deletions

BIN
assets/card-texture-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

BIN
assets/card-texture-4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -43,6 +43,8 @@ def draw_card_face(color, symbol):
if (symbol == "W"):
img.negate(channel="rgb")
draw_card_trim(img)
draw_card_texture_overlay(img)
draw_mask(img)
save_img(img, color.asset, symbol)
if (symbol == "W"):
save_img(img, color.asset, 40)
@ -79,6 +81,12 @@ def draw_card_trim(img):
return img
def draw_card_texture_overlay(img):
with Image(filename='assets/card-texture-3.png') as texture:
img.composite(texture)
return img
def draw_mask(img):
# Mask with a pink outline. This pink outline is this replaced
# with a transparency layer before being returned