How crucial is it to encode it as a string instead of cutting out the middle-man and just assigning www.texture directly to tex? Are you playing with the contents of base64Img to try to glitch it out or something?
I notice your Sprite.Create is partly bypassing the middle-man by referencing www.texture directly instead of tex, so I’m curious.
It would also be worth it to test passing www.texture.EncodeToPNG() directly to tex,LoadImage() to confirm if the string encoding is the problem or something else.
I’ve done this before and it’s worked fine. Are you loading a file off the disk that you saved in another application or are you trying to write a file in Unity to disk and then reload it via WWW?
I have been struggling with this also a pretty long time and I guess you are doing the same mistake
byte[ ] Bytes = System.Convert.FromBase64String(BLACK_MAGIC_STRING);
this function is taking the BASE64 string without any prefix
so THIS IS WRONG
**data:image/png;base64,**iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAgAElEQVR4Xty9B7hlV3Xn+d/73PuqXuWonHNAIiOCyBnTYMA27cCME3gcuu1vPO7xTDc27a+/nmnbM9NjG…
THIS IS CORRECT
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAgAElEQVR4Xty9B7hlV3Xn+d/73PuqXuWonHNAIiOCyBnTYMA27cCME3gcuu1vPO7xTDc27a+/nmnbM9NjG…