最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Displaying the base64 tiff images in HTML - Stack Overflow

programmeradmin4浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 5

According 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.

发布评论

评论列表(0)

  1. 暂无评论