如何显示tiff图像 [英] how to display tiff images

查看:84
本文介绍了如何显示tiff图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i想知道,如何使用asp.net查看我页面中的TIFF图像c#



i尝试使用此代码



 Response.ContentType =   image / tif; 
Response.WriteFile(filepath);
Response.Flush();
Response.Close();





但这不会显示任何图像。它的显示打开/保存对话框

解决方案

我认为,主要问题是因为 浏览器 [ ^ ]不支持TIF图像进行内联查看。我尝试了最新的Chrome 26和IE 10.它只适用于Safari。要避免这种情况,请改用PNG或查看 alternatiff.com [ ^ ]项目。

另外正确的内容类型应为 image / tiff (有两个''F')。


正确,将图像添加到Response对象将告诉浏览器将它们作为单独的对象下载,所以你得到打开的保存对话框。



你需要做的就是添加html img标签或asp.net图像标签,并将src或imageurl设置为图像的url

Hi

i want to know , how to view TIFF images in my page using asp.net c#

i was tried with this code

Response.ContentType = "image/tif";
Response.WriteFile(filepath);
Response.Flush();
Response.Close();



but this not display any image . its display open / save dialog

解决方案

I think, that the main problem is because browsers [^] don''t support TIF images for inline viewing. I tried latest Chrome 26 and IE 10. It only works in Safari. To avoid this, use PNG instead or check the alternatiff.com[^] project for TIF support.
Also proper content-type should be image/tiff (with two ''F''s).


Correct, adding images into the Response object will tell the browser to download them as a separate object and so you get the open save dialog.

All you need to do is add html img tags or asp.net image tags and set the src or imageurl to the url of the images.


这篇关于如何显示tiff图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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