HTML:如何仅使用十六进制表示形式显示图像 [英] HTML: How can I display an image using just its hex representation

查看:70
本文介绍了HTML:如何仅使用十六进制表示形式显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
例如,我有一个像这样的图像:

So for example I have an image like:

\x89PNG\r\n\u001A\n\u0000\u0000\u0000\rIHDR\u0000\u0000\u0001@\u0000\........

有什么办法可以在img标签中显示图像?

Is there any way that from that I can show the image in a img tag?

推荐答案

在没有帮助的情况下无法将其原生显示.

You can't show it natively without assistance to convert it.

如果您使用64位编码,则可以.

If you base 64 encode it instead, you can.

<img src="data:image/png;base64,iVBrkJggg==" alt="Base 64 encoded!" />

进一步阅读.

这篇关于HTML:如何仅使用十六进制表示形式显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆