Correctly handle indexed pngs