c# - Can't decode image in webservice -
in webservice image uploaded string, looking (bitmap):
bmþ!\0\0\0\0\0\0>\0\0\0(\0\0\0@\u0002\0\0x\0\0\0\u0001\0\u0001\0\0\0\0\0À!\0\0Ä\u000e\0\0Ä\u000e\0\0\0\0\0\0\0\0\0\0...
or looking (png): \u0089png\r\n\u001a\n\0\0\0\rihdr\0\0\u0003 \0\0\u0002x\b\u0006\0\0\0\u009av\u0082p\0\u0002½.idatxÚìÀ\u0081\0\0\0\0\u0080 ý©\u0017©\0
i make byte array out of byte[] imagebytes = system.text.encoding.utf8.getbytes(image)
then want save image on server, i'm not able create image via image.fromstream(new memorystream(imagebytes), false, false) of it. argumentexception (invalid parameter).
how can translate string (which image) valid byte-array , save image?
Comments
Post a Comment