使用Jquery成功旋转后如何保存图像? [英] How To Save Image After I Successfully Rotate Using Jquery ?

查看:118
本文介绍了使用Jquery成功旋转后如何保存图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在使用此代码,图像旋转,请帮助我旋转后如何保存图像。我的代码在这里: -



  function  rotateImage(degree){ 
$(' #image')。animate({transform:degree},{
步骤: function (现在,fx){
$( this )。css ({
' - webkit-transform'' rotate(' + now + ' deg)'
' - moz-transform'' rotate(' + now + ' deg)'
' transform'' rotate(' + now + ' deg)'
});
}
});
}
< / script>







这是HTML代码对于这个jquery: -





 <   div  >  
< 标签 > 旋转图片:< / label >
< 输入 type = 按钮 class = btnRotate value = 90 onClick = rotateImage(this.value ); / >
< input 类型 = 按钮 class = btnRotate value = - 90 o nClick = rotateImage(this.value); / >
< 输入 type = 按钮 class = btnRotate value = 180 onClick = rotateImage(this.value); / >
< input type = 按钮 class = btnRotate value = 360 onClick = rotateImage( this.value); / > ;
< / div >
< div > < img src = mobile.jpg id = < span class =code-keyword> image / > < / div >

解决方案

' #image')。animate({transform:degree},{
step: function (现在, FX) {


this )。css({
' - webkit-transform'' rotate(' + now + ' deg)'
' - moz-transform'' rotate(' + now + ' deg)'
< span class =code-string>' transform'' rotate(' + now + ' deg)'
});
}
});
}
< / script>







这是HTML代码对于这个jquery: -





 <   div  >  
< 标签 > 旋转图片:< / label >
< 输入 type = 按钮 class = btnRotate value = 90 onClick = rotateImage(this.value ); / >
< input 类型 = 按钮 class = btnRotate value = - 90 o nClick = rotateImage(this.value); / >
< 输入 type = 按钮 class = btnRotate value = 180 onClick = rotateImage(this.value); / >
< input type = 按钮 class = btnRotate value = 360 onClick = rotateImage( this.value); / > ;
< / div >
< div > < img src = mobile.jpg id = < span class =code-keyword> image / > < / div >


Hello,

I am using this code, Image Rotation , please help me how to save image after i rotate it. My code is here:-

function rotateImage(degree) {
	$('#image').animate({  transform: degree }, {
    step: function(now,fx) {
        $(this).css({
            '-webkit-transform':'rotate('+now+'deg)', 
            '-moz-transform':'rotate('+now+'deg)',
            'transform':'rotate('+now+'deg)'
        });
    }
    });
}
</script>




This is the HTML Code for this jquery:-


<div>
<label>Rotate Image:</label>
<input type="button" class="btnRotate" value="90" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="-90" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="180" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="360" onClick="rotateImage(this.value);" />
</div>
<div><img src="mobile.jpg" id="image" /></div>

解决方案

('#image').animate({ transform: degree }, { step: function(now,fx) {


(this).css({ '-webkit-transform':'rotate('+now+'deg)', '-moz-transform':'rotate('+now+'deg)', 'transform':'rotate('+now+'deg)' }); } }); } </script>




This is the HTML Code for this jquery:-


<div>
<label>Rotate Image:</label>
<input type="button" class="btnRotate" value="90" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="-90" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="180" onClick="rotateImage(this.value);" />
<input type="button" class="btnRotate" value="360" onClick="rotateImage(this.value);" />
</div>
<div><img src="mobile.jpg" id="image" /></div>


这篇关于使用Jquery成功旋转后如何保存图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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