admin管理员组文章数量:1389810
I am trying to display the base64 tif images in HTML. Below is my HTML code.
<img ng-if="fileExtension == 'tif'" ng-src="data:image/tiff;base64,{{attachment}}" id="photo-id" style="width: 100%;padding: 15px 0px 15px 0px" />
<iframe ng-if="fileExtension == 'tif'" src="data:image/tiff;base64,{{attachment}}" style="height: 100%;width: 100%" >
</iframe>
I tried above code but unable to display the tif images, can anyone help me on this. Thanks in advance.
I am trying to display the base64 tif images in HTML. Below is my HTML code.
<img ng-if="fileExtension == 'tif'" ng-src="data:image/tiff;base64,{{attachment}}" id="photo-id" style="width: 100%;padding: 15px 0px 15px 0px" />
<iframe ng-if="fileExtension == 'tif'" src="data:image/tiff;base64,{{attachment}}" style="height: 100%;width: 100%" >
</iframe>
I tried above code but unable to display the tif images, can anyone help me on this. Thanks in advance.
Share Improve this question edited Aug 16, 2018 at 6:07 Ajit Boyite asked Aug 16, 2018 at 5:53 Ajit BoyiteAjit Boyite 331 gold badge2 silver badges8 bronze badges 2- 1 which browser are you using?? – umair.ashfr Commented Aug 16, 2018 at 6:10
- 1 I am using Chrome browser – Ajit Boyite Commented Aug 16, 2018 at 6:12
1 Answer
Reset to default 5According to this link, Chrome doesn't support tiff image type. So you will have to convert it some other format(.jpg,.jpeg etc) and then show it in your html page.
本文标签: javascriptDisplaying the base64 tiff images in HTMLStack Overflow
版权声明:本文标题:javascript - Displaying the base64 tiff images in HTML - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744612558a2615745.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论