ASP.NET MVC: jQuery image upload and crop

ASP.NET MVC: jQuery image upload and cropThis is, probably, most used case when you have to use ajax upload of the image and after that you need to use croppind. Please, notice, in this article I described how to crop static image by using Jcrop library, in current post describes almost the same, except image will not be a static and will be uploaded by jQuery. Before reading this, I strongly recommend to read ASP.NET MVC: Crop image by using Jcrop, because in this one I will make accent only on how to upload image and how to save cropped one and will not describe cropping process. But anyway, it will be completed and working example that you can download at the end. Continue reading “ASP.NET MVC: jQuery image upload and crop” »

ASP.NET MVC: Crop image by using Jcrop

ASP.NET MVC: Crop image by using JcropHi all, I’d like to show you today very very simple example of how to crop image by using Jcrop library. Jcrop is a very powerful jQuery image cropping plugin. So, why I chose this one – because this plugin supports many browsers and devices like Google Chrome, Mozilla FireFox, IE 8 (even for IE 8 for Windows XP!), 9, 10, 11, Safari (Mac OS), iPad, iPhone and Android. To avoid confusing, especially of newbies in jQuery and ASP.NET MVC, I decided to split current topic by three separated articles. The main goal in these three articles is to show how to use Jcrop in ASP.NET MVC web application and please take a look on what will be described:

1) This post: First and very simple cropping example with static image that we already have on the page.

2) Second post: On the page we only have select file input, after selection image, system uploads file by using ajax file upload as described here and shows image on the page and after that we can crop this one.

3) Third post: The most interesting from my point, there will be all things from the second post, but only difference is that after selecting and uploading, image will be shown in the popup. And also will describe how to crop image with a big aspect ratio like 1900 x 1900 and submit data to the server. Continue reading “ASP.NET MVC: Crop image by using Jcrop” »