diff --git a/main.py b/main.py index 38f1e81..21d3c00 100755 --- a/main.py +++ b/main.py @@ -39,9 +39,15 @@ def draw_card_face(color, symbol): draw_symbol(img, symbol, color.hex_val, 120, 190) draw_symbol(img, symbol, color.hex_val, int(img.width - 120), 190) draw_rune(img, color) - draw_card_trim(img) draw_mask(img) + if (symbol == "W"): + img.negate(channel="rgb") + draw_card_trim(img) save_img(img, color.asset, symbol) + if (symbol == "W"): + save_img(img, color.asset, 40) + if (symbol == "N"): + save_img(img, color.asset, 0) def draw_symbol(img, symbol, hex_color, x, y): with Drawing() as draw: @@ -89,7 +95,8 @@ def draw_mask(img): img.composite_channel('all_channels', mask, 'screen') img.opaque_paint(target=Color("#c300ff"), fill=Color("transparent"), fuzz=0.4*img.quantum_range) return img - + + def save_img(img, color, symbol): print('Created card {} {}'.format(color, symbol)) sizes = ['50', '25']