format - Base64 Decoded PNG Hex Result not formatted correctly -
i have file .png_encoded extension coming out of unity app. contains string (sample following):
r+oedd11oafdzf5+nydsppeuhshkxnempsqgxidocrzz1cqx1lfx2ygz5yonvmytno5a69lfcbv+tucattreffdlxqa5q3oclhlrf which decodes using base64 decoding in c# .net:
string img64 = system.io.file.readalltext(@"c:\base64.txt"); byte[] img = convert.frombase64string(img64); file.writeallbytes(@"c:\hexresult.png", img); however, resulting hex not have png header @ can tell. i'm not sure if hex png image data @ all? here's sample of resulting hex:
47 e3 84 74 3d 75 a0 07 dd 64 5e 7e 35 80 ec a4 f1 2e 86 c1 ca 5c d7 a6 a5 24 06 c6 20 ce 09 1c f3 d4 24 17 d6 51 71 d9 88 33 e7 23 a7 56 66 13 9e 8e 40 eb d9 45 71 bb fe b6 e0 80 4d 34 5e 7d f7 4b 5d 06 b9 43 73 9c 94 79 51 15 a8 1b 9e b0 4c 4b db 90 3b 08 bb 2d 10 3d 46 20 ad 4b 5b 53 61 99 54 80 cf 12 1e f3 4c fd a2 0d 1d ea f0 f3 e6 b8 6b dc 37 2f 78 07 a6 ab 3c 05 86 88 e7 1a 61 f7 63 0d 2b 7f 61 15 46 6b 17 eb 18 5c 0a d4 5f 14 5b af c1 69 d6 a9 2e 3a c5 a7 15 41 72 31 82 48 29 f9 eb 78 fe c4 fb 5e dd a5 1b i'm guessing source string has base64 because correctly converts? however, hex result appears have no file type header @ - i've found "47 e3 84 74" garbage or possibly raw png image data.
thanks help, let me know if there's other info help.
Comments
Post a Comment