re-implement equipment with masks
This commit is contained in:
23
create_mask_from_png.py
Normal file
23
create_mask_from_png.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import cv2 as cv
|
||||
import os
|
||||
import numpy as np
|
||||
from window_capture import WindowCapture
|
||||
from config_file import UserConfigs
|
||||
|
||||
#uc = UserConfigs()
|
||||
#wc = WindowCapture(None, None, uc)
|
||||
#screen = wc.get_screenshot(False)
|
||||
# load the original input image and display it to our screen
|
||||
|
||||
#filename = "equip/chests/chest_23_32"
|
||||
path = "equip/wands/"
|
||||
os.chdir(path)
|
||||
|
||||
for entry in os.listdir():
|
||||
if entry.endswith('.png'):
|
||||
|
||||
nelk = entry[:len(entry)-4]
|
||||
if nelk.find('-mask') == -1:
|
||||
out = nelk + "-mask.png"
|
||||
img = cv.imread(entry, cv.IMREAD_UNCHANGED)
|
||||
cv.imwrite(out, img[:, :, 3])
|
||||
Reference in New Issue
Block a user