added -g flag, which lets you generate custom palette files from an image