1
我想在服務器端裁剪圖像(我正在使用'JCrop'和'ASP.NET 3.5')。 有時用戶可以從外部網站添加圖像到文章。我希望 可以讓用戶從該圖像創建縮略圖並將結果存儲在服務器上。 在像從外部圖像url創建asp.net圖像對象
string originalFile = Server.MapPath(this.srcImage.ImageUrl);
using (Image img = Image.FromFile(originalFile))
{
using (System.Drawing.Bitmap _bitmap = new System.Drawing.Bitmap(w, h))
{
_bitmap.SetResolution(img.HorizontalResolution, img.VerticalResolution);
......
[Please see code here][1] will not work as the image URL is external and not a file on the server's file system.
這種情況下,代碼可有人請告訴我如何我可以從一個給定的外部圖像的URL字符串
謝謝你Oded :) – ProgNet 2010-06-27 15:04:59