I need to take a full RGB image, and turn it into image that is optimized for a specific 512 color palette that I already have(I've been hired to make graphics for a Sega Mega Drive game). I can't use GIMP, because that for some reason has hard limit of 256 colors on palettization.
I do not actually care about image being indexed, just the visual effect of lowering the color count while keeping something close to original color scheme.
It'd be nice if the software is free, but I will be okay with literally any software that can do this.