jcrop

Make Jcrop tracker not rotate when cropping a rotated image

有些话、适合烂在心里 提交于 2019-11-28 03:30:27
问题 I'm trying to crop an image using Jcrop, but when I use jqueryrotate on the image, something weird happens. I rotate the image 90 degress then I activate the JCrop, the JCrop does not follow the image rotated, so I also rotate the Jcrop-holder. The resulting image is ok, but when I select a section to crop, I have noticed that my tracker is also rotated. When I drag it up, it goes right, when I drag it left, it goes down. What happens Then it goes How do I make the crop selection tool stay

How should I crop the image at client side using jcrop and upload it?

半腔热情 提交于 2019-11-27 08:26:33
What I am trying to do is select the image using html fileupload control, crop the selection using jcrop, crop image at client side and upload the image. Here is fiddle link https://jsfiddle.net/govi20/spmc7ymp/ Id's used in code: target for jcrop image photograph fileupload control preview canvas preview clear_selection button the clear the selected area setting up the jcrop. <script type="text/javascript"> jQuery(function($){ var api; $('#target').Jcrop({ // start off with jcrop-light class bgOpacity: 0.5, keySupport: false, bgColor: 'black', minSize:[240,320], maxSize:[480,640], onChange :

jQuery JCrop插件的一个问题

点点圈 提交于 2019-11-27 00:20:08
最近应项目需要用到了jQuery的 JCrop 插件,一个用JS裁减图片的功能,非常好用。但这几天发现了一个头痛的问题,在firefox下正常,但在IE下,无论是IE6不是IE7都出现“对象不支持此属性或方法”的错误,而且报错的行数是在插件的脚本本身里,真是有点摸不着头脑了。 代码 < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < script src ="js/jquery.min.js" ></ script > < script src ="js/jquery.Jcrop.js" ></ script > < link rel ="stylesheet" href ="css/jquery.Jcrop.css" type ="text/css" /> < script language ="Javascript" > var ratio = 152 / 163 ; var url = ' css/flowers.jpg ' ; jQuery(window).load( function (){ jQuery( ' #cropbox ' ).attr( " src " ,url).load( function (){ $.Jcrop( " #cropbox " ,{ onChange: showPreview,

How should I crop the image at client side using jcrop and upload it?

你。 提交于 2019-11-26 14:04:57
问题 I am on a component in which there is file-upload HTML control, upon selecting the image using file-upload, the image would be rendered on the HTML5 Canvas element Here is JSFiddle with sample code: https://jsfiddle.net/govi20/spmc7ymp/ id=target is the jcrop image target id=photograph is a fileupload control id=preview is a canvas element id=clear_selection is a button which would clear the canvas Third-party JS libraries used: <script src="./js/jquery.min.js"></script> <script src="./js