如何显示TIFF图像? [英] How do I display a tiff image?
本文介绍了如何显示TIFF图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
林完全失去了,我需要一些指导我。我似乎已经许多后,但没有解释如何能显示TIF图像。我在哪里可以找到一些toturial?我从一开始,如果需要更多钞票。或者,如果你可以将帮助我,这是马丽娟。我只是个新手halding形象。使用MVC 4
Im totally lost and i need some to guide me. I've seem many post but none explain how can display a tif image. Where can i find some toturial? I need from the begining if posible. Or if you can help me with would it be greate. Im just a newbie halding image. Im using mvc 4
推荐答案
大多数浏览器无法处理TIFF图像的同时,你可能已经发现了,所以你会需要将其转换为PNG或JPEG。在你的控制器动作,这些都是基础知识
Most browsers can't handle TIFF images as you've probably found, so you'll need to convert it to a PNG or JPEG. In your controller action, these are the basics.
var memoryStream = new System.IO.MemoryStream();
using (var image = System.Drawing.Image.FromFile("myfile.tif"))
image.Save(memoryStream, ImageFormat.Png);
return File(memoryStream, "image/png");
这篇关于如何显示TIFF图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文