store image data to varibles.