For sure, the example I gave is gonna have way to much garbage from the string concatenation. I redid the mapping algorithm but I still have the overall problem of generating lots of garbage in the main loop:

Are you saying it should be changed to something like:

   for (var i = 0; i < myImageArray.length; i++) {\n      tempStr = "";\n      for (var j = 0; j < myImageArray[i].length; j++) {\n         tempStr += HexMap[myImageArray[i][j]];\n      }\n      myImageString += tempStr;\n   }


Thanks.