简体   繁体   English

IHttpHandler示例,用于图像类型文件C#ASP.Net

[英]IHttpHandler Example required for Image Type Files C# ASP.Net

Can anyone provide a good example of IHttpHnalder for handling Image Type. 任何人都可以提供IHttpHnalder的一个很好的示例来处理图像类型。 I want to resize the image that's hosted on my server 我想调整服务器上托管的图像的大小

Problem using iHttpHandler 使用iHttpHandler时出现问题

and

How to know which image has been requested 如何知道请求了哪个图像

Both have examples of HTTPHandlers for serving images. 两者都有用于提供图像的HTTPHandlers的示例。

The answers by Zhaph and Ady seem to point in the right direction already, but if you need an additional example... Zhaph和Ady的答案似乎已经指向正确的方向,但是如果您需要其他示例...

My article on BlobStreams for the Microsoft.NET Magazine here in Holland includes a very simple example of serving images from database BLOBs . 我在荷兰的《 Microsoft.NET杂志》上有关BlobStreams文章包括一个非常简单的示例,该示例从数据库BLOB提供图像 Can't remember if the example used an IHttpHandler or a simple ASP.NET page, but for the code you need it really doesn't matter that much. 不记得该示例使用的是IHttpHandler还是简单的ASP.NET页,但是对于您所需的代码,它实际上并不重要。

How About. 怎么样。 http://blog.jasonnussbaum.com/?p=104 http://blog.jasonnussbaum.com/?p=104

Source is available in the downlaod. 资料可在下载中找到。

If you are resizing GIF you may also want to look into image quantizing . 如果要调整GIF的大小,则可能还需要考虑图像量化

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM