Add texture overlays
This commit is contained in:
parent
545f1c2a36
commit
ddee013e86
3 changed files with 8 additions and 0 deletions
BIN
assets/card-texture-3.png
Normal file
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
BIN
assets/card-texture-4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
8
main.py
8
main.py
|
|
@ -43,6 +43,8 @@ def draw_card_face(color, symbol):
|
||||||
if (symbol == "W"):
|
if (symbol == "W"):
|
||||||
img.negate(channel="rgb")
|
img.negate(channel="rgb")
|
||||||
draw_card_trim(img)
|
draw_card_trim(img)
|
||||||
|
draw_card_texture_overlay(img)
|
||||||
|
draw_mask(img)
|
||||||
save_img(img, color.asset, symbol)
|
save_img(img, color.asset, symbol)
|
||||||
if (symbol == "W"):
|
if (symbol == "W"):
|
||||||
save_img(img, color.asset, 40)
|
save_img(img, color.asset, 40)
|
||||||
|
|
@ -79,6 +81,12 @@ def draw_card_trim(img):
|
||||||
|
|
||||||
return 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):
|
def draw_mask(img):
|
||||||
# Mask with a pink outline. This pink outline is this replaced
|
# Mask with a pink outline. This pink outline is this replaced
|
||||||
# with a transparency layer before being returned
|
# with a transparency layer before being returned
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue