Optimized indexed image rendering