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

本文标签: javascriptDisplaying the base64 tiff images in HTMLStack Overflow