开发者

How to upload and size a profile picture for a site?

I have a 开发者_Go百科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.


The following site contains a good example of how to do this - Hybrid ASP.NET File Upload and Resize Sample (VB.NET).


If the image is the right shape but just too large you can use the method that Bermo talks about.

However if you'd like to choose the most interesting part of the image you can use the technique that Reddit uses for it's thumbnails.

See here for some info and the source code (Python) is here. Basically it splits the image up into sections and works out which ones are the most interesting by using the entropy value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜