经典 ASP 中的完整图像处理解决方案

发布于 2024-10-10 02:19:34 字数 329 浏览 0 评论 0原文

有人有过在经典 ASP 中实现完整图像处理解决方案的经验吗?我需要一个解决方案,用户可以:

  1. 上传图像
  2. 上传的图像存储在文件系统上(wwwroot 内部或外部)
  3. 图像显示在浏览器中,但大小会调整...按需 按需

调整大小是我的主要问题。在 PHP 中,我可以使用 phpThumb 库,它允许我在查询字符串中指定文件名和最大宽度/高度。该库相应地调整图像大小,此外,它还会缓存图像的副本,以便下次请求具有相同宽度/高度的相同图像时,将从缓存中提供服务。

如果可能的话,我可以使用开源组件在经典 ASP 中实现这样的解决方案吗?图像魔法?

Does anyone have a past experience on implementing a complete image manipulation solution in classical ASP? I need a solution where a user can:

  1. Upload an image
  2. The uploded image is stored on the filesystem (inside or outside wwwroot)
  3. The image is displayed in the browser but it is resized... on-demand

The on-demand resizing is my main problem. In PHP I could use phpThumb library that allows me to specify a filename and max width/height in a query string. The library resizes the images accordingly, in addition, it caches the copy of the image so that next time the same image with same width/height is requested it is served from the cache.

Can I implement such a solution in classical ASP, if possible with open-source components? ImageMagick?

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

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

发布评论

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

评论(3

伏妖词 2024-10-17 02:19:34

ImageMagick 似乎有一个可用于此目的的 COM+ 组件

另一个常用的成熟(尽管我不认为它是免费的)库是 AspJpeg

It would appear that ImageMagick has a COM+ component that can be used for this purpose.

Another mature (though I don't think it's free) library that's commonly used for this is AspJpeg.

度的依靠╰つ 2024-10-17 02:19:34

ASP.net 具有处理图像的内置功能,因为大多数提供 ASP classic 的服务器都安装了某个版本的 ASP.net,因此您可以依靠它来完成工作。

IE:

<img src="resize.aspx?file=/gallery/photo1.jpg&w=300&height=400" />

ASP.net has build-in functions to manipulate images, since most servers serving ASP classic have some version of ASP.net installed, you can rely on it to do the work.

ie:

<img src="resize.aspx?file=/gallery/photo1.jpg&w=300&height=400" />
情未る 2024-10-17 02:19:34

这篇文章有点老了,但我们最近在通过经典 ASP 调整大小方面遇到了同样的问题。

我们找到了一个使用 VB.NET 路线的解决方案,但它并没有完成我们想要的一切,因此我们对其进行了调整,以包括调整大小、裁剪、填充(带颜色)以及将生成的 jpg 显示到屏幕和/或一个文件。

我们已将我们的成果上传到一个包含脚本的 zip 文件和一个包含说明的示例 asp 文件中:http://easierthan.blogspot.co.uk/2013/02/code-tip-3-classic-asp-image-resizer.html

关于上传,我们使用了http://www.freeaspupload.net,它看起来效果很好。

This post is a little old, but we recently faced the same issues regarding resizing via Classic ASP.

We found a solution which used the VB.NET route, but it didn't do everything we wanted so we adapted it to include features to resize, crop, pad (with colour) and display the resulting jpg out to the screen and / or a file.

We've uploaded our efforts here in a zip file with the script and an example asp file with instructions: http://easierthan.blogspot.co.uk/2013/02/code-tip-3-classic-asp-image-resizer.html

With regards to uploading, we used http://www.freeaspupload.net which seemed to work very well.

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