mvc4中的图像裁剪 [英] Image cropping in mvc4

查看:61
本文介绍了mvc4中的图像裁剪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在使用mvc4中的以下链接进行图像裁剪

http://www.askamoeba.com/Opensource/Opensourcedetail/132/Crop-Resize-Upload-Images-in-C -MVC3-MVC4-using-Jquery-Razor



显示带有裁剪的固定区域的图像但是用户不应该裁剪图像只是移动图像上的区域(例如:在facebook中)怎么做???

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???

推荐答案

我刚刚在jcrop.js中评论了以下几行



函数newSelection(e)// {{{

{

// if(options.disabled){

/ / return false;

//}

// if(!options.allowSelect){

//返回false;

//}

// btndown = true;

// docOffset = getPos(
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 );

// C. oords.setPressed(pos);

//Selection.update();

//Tracker.activateHandlers(selectDrag, doneSelect,e.type.substring(0,5) )==='touch');

//KeyManager.watchKeys();



//e.stopPropagation(); < br $>
//e.preventDefault();

//返回false;

}



它确定了......
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...


这篇关于mvc4中的图像裁剪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆