added spi_to_img_gui function