Regarding conversion of image-to-base64 string in TouchDevelop -
i getting image (encoded in base64 string format) server. base64-encoded string has converted image. doing in 2 steps:
convert base64 encoded string buffer - using bits -> string buffer(string,"base64")
write buffer picture (of same dimensions) - using picture -> write buffer(buffer) , i'm displaying picture.
the base64 string server (whole string):
ivborw0kggoaaaansuheugaaajeaaaaecayaaaaspvwuaaaamuleqvr42u3sqqoaiqgawl7h/x+6sqslhcqcpi7qitgnmvysiik+lex+/zjpcifnsnvs5pzw3paunlgrm/w6ezpqv3yjqqqrrbbbbbfeeeeeeuqqqqqrrbbbbbfeeeeeeuqqqqqrrbbbbbfeeeeeeuqqqqqrrbbbbbfeeeeeeuqqqqqrrbbbbbfeeeeeeuqqqqqrrbbbviuoawqllkahgpjnaaaaaelftksuqmcc
the problem is: not getting desired image when display on wall. shows small image.
so tried finding string touchdevelop expected in bits -> string buffer(string,"base64") method.
- i obtained original image online converter (http://www.motobit.com/util/base64-decoder-encoder.asp) supplying same string obtained server. image correct.
- then did reverse process of described above – converting image base64 string. this, did using picture buffer(picture) , buffer string(“base64“) , displayed base64 string generated touchdevelop same image.
the base64 string got touchdevelop (just small part of actual string - actual string size-23,300 chars):
////////////////////////////////grkz/xkzgf////////////////8zgrn/grkz////////////grkz/xkzgf8zgrn/grkz//////8zgrn/grkz/xkzgf8zgrn//////xkzgf8zgrn///////////8zgrn/grkz/xkzgf8zgrn//////xkzgf8zgrn//////////////////////xkzgf8zgrn//////xkzgf8zgrn//////xkzgf8zgrn/grkz/xkzgf///////////xkzgf8zgrn//////xkzgf8zgrn/grkz/xkzgf//////////////////////grkz/xkzgf//////grkz/xkzgf//////grkz/xkzgf8zgrn/grkz////////////grkz/xkzgf8zgrn/grkz//////8zgrn/grkz/xkzgf8zgrn//////////////////////xkzgf8zgrn//////xkzgf8zgrn//////xkzgf8zgrn///////////8zgrn/grkz//////8zgrn/grkz//////////////////////8zgrn/grkz/xkzgf8zgrn//////xkzgf8zgrn//////xkzgf8zgrn/grkz/xkzgf///////////xkzgf8zgrn////////////////……
as might have noticed, base64 string server , base64 string touchdevelop expects show correct image have huge difference. , resulting displaying of incorrect image. stuck in problem few days. there bug? if not, can me problem?
Comments
Post a Comment