Fix for pixel index for set_rgb().