补全后缀名

This commit is contained in:
wszqkzqk 2022-07-31 21:33:58 +08:00
parent afda2a02c8
commit cb94f49cf9

View File

@ -197,7 +197,7 @@ def load_image_frames(directory, image_name, colorkey, accept):
return frame_list return frame_list
# colorkeys 是设置图像中的某个颜色值为透明,这里用来消除白边 # colorkeys 是设置图像中的某个颜色值为透明,这里用来消除白边
def load_all_gfx(directory, colorkey=c.WHITE, accept=(".png", ".jpg", ".bmp", ".gif", "webp")): def load_all_gfx(directory, colorkey=c.WHITE, accept=(".png", ".jpg", ".bmp", ".gif", ".webp")):
graphics = {} graphics = {}
for name1 in os.listdir(directory): for name1 in os.listdir(directory):
# subfolders under the folder resources\graphics # subfolders under the folder resources\graphics