I am using alamofire to send Image to server with multipart.
multipartFormData.append(UIImageJPEGRepresentation(self.imageDet[0].image!,0.5)!, withName: "filestream", mimeType: "image/jpeg")
I have the image in byte format from server side.
Here is an example of the bytes I receive at the server side
����JFIFHH��XExifMM*�i&�������8Photoshop 3.08BIM8BIM%��ُ�� ���B~����"��
���}!1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
���w!1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������C
How can I convert the following data back to image?
.jpeg
file by theJPEGRepresentation
and also uses an encoder to convert the image into Data. And then it sends to Server. Did I get the concept wrong? – Selfpossession