Click here to Skip to main content
15,299,443 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi I am doing image cropping by using following link in mvc4
http://www.askamoeba.com/Opensource/Opensourcedetail/132/Crop-Resize-Upload-Images-in-C-MVC3-MVC4-using-Jquery-Razor

which is showing image with fixed area with cropping but user should not crop the image just move the area on the image(ex:in facebook) how to do it???
Posted
Comments
   
If the user is not cropping the image, but you asked about cropping, what should crop it, based on what data?
Of just use System.Drawing.Image, and see the help on this class. Cropping is pretty simple.
—SA

1 solution

I just commented the following lines in jcrop.js

function newSelection(e) //{{{
{
//if (options.disabled) {
// return false;
//}
//if (!options.allowSelect) {
// return false;
//}
//btndown = true;
//docOffset = getPos($img);
//Selection.disableHandles();
//Tracker.setCursor('crosshair');
//var pos = mouseAbs(e);
//Coords.setPressed(pos);
//Selection.update();
//Tracker.activateHandlers(selectDrag, doneSelect, e.type.substring(0,5)==='touch');
//KeyManager.watchKeys();

//e.stopPropagation();
//e.preventDefault();
//return false;
}

it worked out...
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900