feat: revert pixel 0,0,0,0 preprocess

This commit is contained in:
yuyuyzl committed 2025-08-16 05:56:01 +08:00
1 parent 75bb4ae9d1
commit f25f6b0124
1 file changed
+5
+5
View File
@@ -534,6 +534,11 @@ def main():
img = Image.open(f"data/images/{args.character}.png")
img = img.convert('RGBA')
ow, oh = img.size
for i, px in enumerate(img.getdata()):
if px[3] <= 0:
y = i // ow
x = i % ow
img.putpixel((x, y), (0, 0, 0, 0))
if ow != 512 or oh != 512:
img = resize_to_512_center(img)
if args.alpha_clean: