changing the int array to byte array for the image file.