在asp.net动态图像大小调整 [英] Image resizing on the fly in asp.net

查看:147
本文介绍了在asp.net动态图像大小调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了简单可以说,我有一个网页,需要显示图像的缩略图。图像位置存储在数据库(图像被存储在Amazon S3)。是否有可能有我的Web服务器比例放倒的大图片前,它被传递到客户端?这样,我就不必存储每个图像的缩略图和客户端可以下载一个更小的文件。

For simplicity lets say that I have a web page that needs to display thumbnails of images. The images locations are stored in a database(the images are stored on Amazon S3). Is it possible to have my web server scale down the large image before it is delivered to the client? This way I don't have to store thumbnails of every image and the client can download a smaller file.

推荐答案

当然,没问题。有丰富的资源,显示如何从数据库中抛出了一个形象在网络上。所以我不会重复在这里。

Sure, no problem. There's plenty of resources on the web that show how to dish up an image from a database. So I won't duplicate that here.

一旦加载图像,你可以很容易地使用.NET缩水。有以下URL的例子。它不会做的正是你在做什么,但它产生的图像的缩略图。

Once you've loaded the image, you can easily shrink it using .NET. There is an example at the following URL. It doesn't do exactly what you are doing, but it does generate thumbnails of an image.

http://blackbelt$c$cr.com/Articles/graphics/creating-website-thumbnails-in-asp-net

这篇关于在asp.net动态图像大小调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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