added incomplete code for converting image to byte array