图像类型文件 C# ASP.Net 所需的 IHttpHandler 示例

发布于 2024-07-10 12:40:18 字数 58 浏览 5 评论 0原文

任何人都可以提供 IHttpHnalder 处理图像类型的好例子。 我想调整服务器上托管的图像的大小

Can anyone provide a good example of IHttpHnalder for handling Image Type. I want to resize the image that's hosted on my server

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一场信仰旅途 2024-07-17 12:40:18

使用 iHttpHandler 的问题

如何知道已请求哪个图像

两者都有用于提供图像的 HTTPHandler 示例。

Problem using iHttpHandler

and

How to know which image has been requested

Both have examples of HTTPHandlers for serving images.

屋顶上的小猫咪 2024-07-17 12:40:18

Zhaph 和 Ady 的答案似乎已经指出了正确的方向,但如果您需要其他示例......

我为 Microsoft 撰写的关于 BlobStreams 的文章荷兰的 .NET 杂志包括一个从数据库 BLOB 提供图像的非常简单的示例。 不记得该示例是否使用了 IHttpHandler 还是简单的 ASP.NET 页面,但对于您需要的代码来说,它确实没有那么重要。

The answers by Zhaph and Ady seem to point in the right direction already, but if you need an additional example...

My article on BlobStreams for the Microsoft.NET Magazine here in Holland includes a very simple example of serving images from database BLOBs. 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.

屌丝范 2024-07-17 12:40:18

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

源代码位于下载。

如果您要调整 GIF 的大小,您可能还需要研究图像量化

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文