Open angelsix opened 1 year ago
I`m getting this error
File "/home/server/development/gamewatch/game-and-watch-retro-go/parse_roms.py", line 1087, in generate_system
f.write(self.generate_img_object_file(rom, cover_width, cover_height))
File "/home/server/development/gamewatch/game-and-watch-retro-go/parse_roms.py", line 668, in generate_img_object_file
write_covart(Path(img), rom.img_path, w, h, args.jpg_quality)
File "/home/server/development/gamewatch/game-and-watch-retro-go/parse_roms.py", line 237, in write_covart
img = Image.open(srcfile).convert(mode="RGB").resize((w, h), Image.ANTIALIAS)
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
make[1]: *** [Makefile.common:581: build/roms.a] Error 1
make[1]: Leaving directory '/home/server/development/gamewatch/game-and-watch-retro-go'
make: *** [Makefile.common:800: flash] Error 2
How do I fix it?
Exactly as I mentioend above, do that change to the py script
thank you Sir. I did change per your instructions
from
from PIL import Image, ImageOps
img = Image.open(srcfile).convert(mode="RGB").resize((w, h), Image.ANTIALIAS)
img.save(fn,format="JPEG",optimize=True,quality=jpg_quality)```
to
```def write_covart(srcfile, fn, w, h, jpg_quality):
from PIL import Image, ImageOps
img = Image.open(srcfile).convert(mode="RGB").resize((w, h), PIL.Image.LANCZOS)
img.save(fn,format="JPEG",optimize=True,quality=jpg_quality)```
still getting error
pictures I`m trying are PNG not JPEG, but they worked in the past
You have to do this after fetching the repo. If you re-run the code that fetches the repo again it will override your changes
parse_roms.py needs
Adding, and
Image.ANTIALIAS
changing toPIL.Image.LANCZOS
.Reason: Image.ANTIALIAS is now deprecated