Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
138
rated 0 times [  144] [ 6]  / answers: 1 / hits: 30932  / 14 Years ago, tue, february 15, 2011, 12:00:00

I am packaging an image into jSON and sending it to the client .... On the client side I wish to display this data as a image ...



I am not sending the Image URL via JSON ... I am trying to send the whole image data itself



JSON image data that I receive in the client looks like this:



PNG  ÛâIÂØ>ó4ã¯wcÏLÓQÆÝîHâèÖnò)©£M¡ÀÍ.j3µx¼ê#Ì{Þ±NÔÃïj$­©N¨eÃyßÆR$id'|ýpøcå{ãyY'àþ½b|äô¹¨:Óç}@ÖÀdõÉ­Ä

More From » jquery

 Answers
8

You can accomplish this with data URL's in all browsers save for IE7 and below. The basic format is this:



<img src=data:image/png;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub/
/ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcpp
V0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7>


You can read more about it here: http://www.websiteoptimization.com/speed/tweak/inline-images/


[#93731] Sunday, February 13, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gregorio

Total Points: 362
Total Questions: 95
Total Answers: 93

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;