write indices for imageview