You could do this by lowering the 0.263 value, but this would leave the most prominent scratches. Then you could remove them by hand in an editing software (easily as they would be in the middle of the screen).
So nothing automated unless you want to go one step further : 1 pass as above, 2nd pass reads the screen coordinates from the layout file and erases the inside area
Thank you very much for your work !
For those who want to remove the scratches and the reflections, here is an automated way :
- Install ImageMagick from https://imagemagick.org/script/download.php
- run this command line (update the path where needed) :
"C:\Program Files\ImageMagick\magick.exe" mogrify -channel A -fx "a<0.263 ? 0 : a" "C:\Emulators\Mame0269b_64bit\artwork\1941\1.png"
and...that's it !
This turns to full transparency (alpha = 0 ) all the pixels that have less than 67 alpha transparency (0.263 = 67/ 255) , typicaly all the scratchs and reflections.
Thank you for the post and thanks to Mr RetroLust of course !
For those who want to remove the scratches and the reflections, here is an automated way :
- Install ImageMagick from https://imagemagick.org/script/download.php
- run this command line (update the path where needed) :
"C:\Program Files\ImageMagick\magick.exe" mogrify -channel A -fx "a<0.263 ? 0 : a" "C:\Emulators\Mame0269b_64bit\artwork\1941\1.png"
and...that's it !