jcrop

JCropped Get Cropped Image Height

霸气de小男生 提交于 2019-12-25 11:34:16
问题 I'm using JCrop to get the dimensions of the image to be cropped. I have the code for getting the dimensions set like this: function updateCoordinates(c) { console.log(c) $('#image_x').val(c.x); $('#image_x2').val(c.x2); $('#image_y').val(c.y); $('#image_y2').val(c.y2); $('#image_w').val(c.w); } $('#jcrop_target').Jcrop({ aspectRatio : 2 / 1, onSelect : updateCoordinates, onChange : updateCoordinates }); the variable 'c' has the values c.x, c.x2, c.y, c.y2 and c.w . I'm making a guess that c

How to get responsive images working with JCrop

大憨熊 提交于 2019-12-24 10:35:22
问题 I see some solutions where the truesize property is used to get JCrop to work with responsive images correctly. However, I'm having a hard time getting the images responsive in the first place when using JCrop. If I remove the jCrop code and add the following css, the image is responsive. In short - JCrop works. Responsive image works. But when put together, the image isn't responsive. JSFiddle here: Just uncomment the css. http://jsfiddle.net/work77/oh5esg19/ img{ max-width:80%; max-height

jQuery Jcrop setSelect shows visually, but when clicked to move, it jumps

我是研究僧i 提交于 2019-12-23 21:13:54
问题 I am using the jQuery plugin Jcrop. I have an issue with one of the initial setup settings called setSelect. The property takes in an array with two sets of x and y coordinates (top left corner, and bottom right corner). <img src="blah" id="cropTool" /> <script type="text/javascript"> $(function() { $('#cropTool').Jcrop( { setSelect: [ $('#cropTool').width()/4, $('#cropTool').height()/4, ($('#cropTool').width()/4)*3, ($('#cropTool').height()/4)*3 ] }); }); </script> Visually this does exactly

jQuery图像照片剪裁插件Jcrop

此生再无相见时 提交于 2019-12-23 13:09:30
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Jcrop 是一个jQuery插件,它能为你的WEB应用程序快速简单地提供图片裁剪的功能。 特点: 对所有图片均unobtrusively(无侵入的,保持DOM简洁) 支持宽高比例锁定 支持 minSize / maxSize设置 支持改变选区或移 动选区时的回调(Callback) 支持用键盘微调选 区 通过API创建互 动,比如动画效果 支持CSS样式 Demo演示源文件下载 源文件下载(.zip) — 149K 下面附一些链接: jQuery图像照片剪裁插件Jcrop中文演示 jQuery图片剪裁插件 Jcrop Jcrop » the jQuery Image Cropping Plugin 来源: oschina 链接: https://my.oschina.net/u/778827/blog/161771

GWT client side cropping

爱⌒轻易说出口 提交于 2019-12-22 12:56:16
问题 I'm stuck on integrating gwt with JCrop or imgareaselect javascript libraries I have an image, which url is changing each time the client change the file choosen from its filesystem (using an upload widget). I want the user select the area in its image, this way i will be able to have images with aspect ratio respected respect to the client wishes. Problem is i can't succed in making imgareaselect or jcrop called on load event, each time i have null, if i try jquery ("imagepreview") jquery is

Cropping image drawn into canvas with JCrop

北城余情 提交于 2019-12-21 21:59:59
问题 I'm new to HTML5 and trying to crop an image with JCrop. There is no problem if I want to crop it directly but when it is drawn into a canvas JCrop does not work. I think the reason maybe that I'm creating an image variable to be able to draw it into viewport canvas and setting it's Id dynamically. So Jquery cannot access that dynamically created image. But even so I don't know what to do. Here is my full HTML code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org

jcrop turns transparent image black

夙愿已清 提交于 2019-12-21 13:41:44
问题 I would like to use jcrop to select an area on something that has built in javascript which I can't modify. This javascript is interfering with jcrop i think. so I tried putting a transparent gif over the top of the thing I would like to select. This stopped the thing underneath interfering with jcrop and I coudl select areas fine. Jcrop, however, is making the transparent image black rather than transparent. Here is a jsfiddle http://jsfiddle.net/andieje/rvTmX/ This is the html <img id=

Django app for image crop using a cropping tool

谁说胖子不能爱 提交于 2019-12-20 08:50:55
问题 I need an app for crop an image in the client side, I mean, using a cropping tool like Jcrop jquery plugin. I found this tools: django-image-cropper django-image-cropping django-imagehandler django-avatar-crop But the last two depends of admin and the two first seem very coupled to ther own ImageFields and models, any good solution? We are working over a big application with many features and is very difficult change the logic writed 回答1: I think this is something that you will probably be

JCrop, how to clear all the div width/height markup?

廉价感情. 提交于 2019-12-19 07:53:20
问题 I have a profile picture system which allows image cropping using jCrop. I've noticed if the user goes through the process a few times, the crop dimensions are not calculated properly simply because the previous image is still there. I've tried the destroy() method from the API , but that doesn't clear the image source from the .jcrop-holder div and its child image element. How can I get rid of this easily? Thanks. 回答1: I had a similar issue with an old version of jCrop and created a custom

JQuery JCrop - How to set a fixed size selection area?

空扰寡人 提交于 2019-12-17 21:48:15
问题 I'm trying to figure out how to fix the selection box size under JCrop. The documentation mentions how to set an initial selection area but not how to make it fixed size. Does anybody knows how could I make it fixed. Thanks in advance. http://deepliquid.com/content/Jcrop_Manual.html 回答1: You are basically looking for the API section. Having extensively used this plugin myself, I know exactly what you're looking for: var api; var cropWidth = 100; var cropHeight = 100; $(window).load(function()