Asp.net MVC配置文件图像控件

Asp.net MVC Profile image control
2020-10-17
  •  译文(汉语)
  •  原文(英语)

在我的ASP.NET MVC网站中,用户需要上传个人资料图片,并调整大小/裁剪并移动图像,直到满意为止(在红色边框内,如下所示:http : //imgur.com/GqeCTil)

我偶然发现了http://imageresizing.net/,它很好,但是我有点需要前端UI控件供用户使用.

实现这种控制的最简单方法是什么?我必须自己开发,还是有什么建议?

解决过程1

如果我理解您的问题,我添加了2个链接来处理图像调整大小:

  1. http://www.codeproject.com/Tips/481015/Rename-Resize-Upload-Image-ASP-NET-MVC
  2. http://www.leniel.net/2012/04/resize-img-on-fly-aspnet-webimage.html

希望对您有所帮助,请让我知道...

更新:此链接可能也有帮助(根据评论)-

http://techslides.com/image-zoom-drag-and-crop-with-html5

速聊1:
并非如此,我需要的是UI控件,用户可以在其中拖动图像并调整其大小并使它适合红色边框,希望这是合理的!:-)
解决过程2

我认为通过javascript库实现这种控制的更好方法.此页面包含演示.

  1. 画布和jQuery示例

  2. 上载拖放图像示例的jQuery插件

我认为第一个比较适合您的描述.

In my ASP.NET MVC site, the users need to upload profile pictures, and resize/crop and move the image until the user is satisfied (within the red border as shown here: http://imgur.com/GqeCTil)

I've stumbled upon the http://imageresizing.net/ which is very fine, but i kinda need the front UI control for the users to use.

What is the easiest way to achieve this kinda control? do i have to develop my own, or do you guys have any recommendations?

Solutions1

If I understood your question, I added 2 links dealing with image re-sizing:

  1. http://www.codeproject.com/Tips/481015/Rename-Resize-Upload-Image-ASP-NET-MVC
  2. http://www.leniel.net/2012/04/resize-img-on-fly-aspnet-webimage.html

I hope it helps, please let me know...

Update: This link may help too (from comments) -

http://techslides.com/image-zoom-drag-and-crop-with-html5

Talk1:
Not really, what i need is the UI control, where the user can drag and resize the image and make it fit inside the red border, hope that made sense! :-)
Solutions2

I think better way to achieve this kinda control via javascript libraries. This pages contains demo.

  1. Canvas and jquery example

  2. jQuery plugin that Upload Drag & Crop Image example

I think the first one is better for your description.

转载于:https://stackoverflow.com/questions/30816436/asp-net-mvc-profile-image-control

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入