read images from stdin
split palettes out to a new file