I have image data in an arrayBuffer following an xmlHttpRequest. I need to display the image in an image tag. For most browsers I can use a blob to reference the binary data but I need to support mobile Safari on iOS 5.1 which has no support for blobs. My initial thought was to base64 encode the data and just set the src attribute on the image tag like so:
this.imageTag.src = 'data:image/jpeg;base64,' + base64EncodedImage;
However, in some instances the base64EncodedImage string is over 800,000 characters long and just crashes the browser.
What other method could I use to display the image (I only have access to the arrayBuffer data and can't make any server side changes easily)?