java - base32 image for img tag -
i have faced interesting thing as... if use code download image string base64 encoded byte array works fine
data:image/png;base64,<string>
but tring encode same image base32 , call as
data:image/png;base32,<string>
but way doesn't work. maybe using wrong protocol or something... :(
so question is... how call base32 image img tag?
thanks
if mean browser isn't displaying image, means browser doesn't support base32. have same issue iceweasel4, firefox 3, , chrome 12. ie7 doesn't show either base64 or base32-encoded inline images.
here files i'm using test, stolen http://www.sweeting.org/mark/blog/2005/07/12/base64-encoded-images-embedded-in-html:
test1.html shows fine in firefox, iceweasel, chrome:
<img src="data:image/gif;base64,r0lgodlhuaapakiaaaslav///88pd9wqsymapmzmztzf ymdakyh5baquap8alaaaaabqaa8aaapbwlrc/jdksve4oovnu/9gqardsrbhegygmahqo4r0bqcj iq8e4bmcqc930jluygrmdaacdiigmlvraptywy5fkm1iqe+mp+l4rphz+qiobauyecy4p2tgrjze h9y79mzsawfoairxf3jyiyxuhimgb5ktkpfvzj4zbyecixaoikbwnxh4fnt9e3ktgzyhhrchinon s3cfashff2jhvczlg5uchynun5eedrxmaf15xefrxgzwwdcium8gcmdsq84llqfy5r14wdb5lyon 4ubws7jx9ncv9/j5+g4jads=">
test2.html doesn't show in browser have.
<img src="data:image/gif;base32,i5eumobzmfiaadyauiaaacylnl77776pb4h5lkvrrgak mztgm3lf6ythlkjsd6ieaqkab7yafqaaaaaakaaa6aaaapnvrow47yymuskxxa4oxtn375qkqbcd jeieo6qmqyy2q2r3qr2g2bzdeehqjyataja4656qtfxmqzdgoqaby5riuaylk2ycstmfwlsffdgu qqpprst6f6fotbz7viqoaqcrq6bghctwwrvmszpb7xf36ztgy2ybnbuii4ixojzitddodyrqm34s sojjc33ghymw3b4crf3i5cfaocprq6d6pn6xw6jnqgoipbvqugfhhdnto4cqckcfc5rgdpbgmunz xhefqnxj7f46ouoeyac5pfoecuk6azlftvzcxdhqmcthkjb44jjna7mokhlyyayhslzke7ron4cl xdy7jvyv674pt6qobeadw===">
i used b64decode , b32encode python's base64 module create base32-encoded image base64-encoded image.
according http://tools.ietf.org/html/rfc2397, formats supported base64 , plain ascii (for characters outside range of printable 7-bit characters, use standard %xx hex-encoding.)
ie apparently doesn't support in-line images until ie8.
Comments
Post a Comment