added --overwrite to image conversion

This commit is contained in:
raphael60650 2021-05-27 14:19:56 +02:00
parent df44624807
commit 84debb7a1f
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,6 @@ def patch_ct_icon(self):
for i, id in enumerate(files): for i, id in enumerate(files):
if os.path.exists(f"./file/cup_icon/{id}.png"): if os.path.exists(f"./file/cup_icon/{id}.png"):
cup_icon = Image.open(f"./file/cup_icon/{id}.png").resize((128, 128)) cup_icon = Image.open(f"./file/cup_icon/{id}.png").resize((128, 128))
ct_icon.paste(cup_icon, (0, i * 128))
else: else:
cup_icon = Image.new("RGBA", (128, 128)) cup_icon = Image.new("RGBA", (128, 128))
@ -32,6 +31,7 @@ def patch_ct_icon(self):
draw.text((5 + 2, 80 + 2), "%03i" % (i-10), (0, 0, 0), font=font) draw.text((5 + 2, 80 + 2), "%03i" % (i-10), (0, 0, 0), font=font)
draw.text((5, 80), "%03i" % (i-10), (255, 165, 0), font=font) draw.text((5, 80), "%03i" % (i-10), (255, 165, 0), font=font)
ct_icon.paste(cup_icon, (0, i * 128))
ct_icon.paste(cup_icon, (0, i * 128))
ct_icon.save("./file/ct_icons.tpl.png") ct_icon.save("./file/ct_icons.tpl.png")

View file

@ -30,7 +30,7 @@ def patch_file(self):
for i, file in enumerate(fc["img"]): for i, file in enumerate(fc["img"]):
self.Progress(statut=self.translate("Conversion des images")+f"\n({i + 1}/{len(fc['img'])}) {file}", add=1) self.Progress(statut=self.translate("Conversion des images")+f"\n({i + 1}/{len(fc['img'])}) {file}", add=1)
if not (os.path.exists("./file/" + get_filename(file))): if not (os.path.exists("./file/" + get_filename(file))):
subprocess.call(["./tools/szs/wimgt", "ENCODE", "./file/" + file, "-x", fc["img"][file]] subprocess.call(["./tools/szs/wimgt", "ENCODE", "./file/" + file, "-x", fc["img"][file], "--overwrite"]
, creationflags=CREATE_NO_WINDOW) , creationflags=CREATE_NO_WINDOW)
for file in glob.glob(self.path_mkwf+"/files/Scene/UI/MenuSingle_?.szs"): for file in glob.glob(self.path_mkwf+"/files/Scene/UI/MenuSingle_?.szs"):