10-16-2016, 11:18 AM
(This post was last modified: 10-16-2016, 11:52 AM by DragonDePlatino.)
If you're planning on converting a screenshot to the SNES palette, it's going to make very little difference. Unless you're working with very smooth gradients, the conversion will be unnoticeable. With that being said, here's a python script that'll handle the conversion for you:
EDIT:
Just spent half an hour trying to bake this into an .exe but Python is a stubborn beast. If you can't run python scripts then SOL. ¯\_(ツ)_/¯
Code:
from PIL import Image
import sys
import os
filename = None
picture = None
while True:
try:
filename = input("Enter a filename: ")
picture = Image.open(filename)
except FileNotFoundError:
print("File ", filename, " not found!", sep='\"')
continue
break
width, height = picture.size
pic = picture.load()
for x in range(width):
for y in range(height):
color = pic[x,y]
tempcolor = [x - (x % 8) for x in color] # Where the magic happens
tempcolor[3] = 255 # Alpha is always 255
newcolor = tuple(tempcolor)
pic[x,y] = newcolor
filename = os.path.splitext(filename)[0] + "_converted.png"
picture.save(filename)
print("Saved converted image to", filename)
EDIT:
Just spent half an hour trying to bake this into an .exe but Python is a stubborn beast. If you can't run python scripts then SOL. ¯\_(ツ)_/¯