0

I have a site that has a profile page and I would like to allow the users to upload an image for the profile picture. I forsee a problem if the user select an image that is larger than what I am allowing for the site. Is their a good refrence or example how to accomplish this?

The site is developed in Visual Studio 2008 with VB.NET 3.5.

4

2 回答 2

1

以下站点包含如何执行此操作的一个很好的示例 -混合 ASP.NET 文件上传和调整大小示例 (VB.NET)

于 2010-04-15T11:56:16.580 回答
1

如果图像是正确的形状但太大,您可以使用Bermo所说的方法。

但是,如果您想选择图像中最有趣的部分,您可以使用Reddit用于缩略图的技术。

有关一些信息,请参见此处,源代码(Python)在此处。基本上,它将图像分成多个部分,并通过使用该entropy值来确定哪些是最有趣的。

于 2010-04-15T12:14:03.537 回答