jcrop

jcrop turns transparent image black

孤街醉人 提交于 2019-12-04 06:27:27
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="cropbox" src="http://deepliquid.com/projects/Jcrop/demos/demo_files/sago.jpg" style="position: absolute;

Jcrop not cropping properly the images

匆匆过客 提交于 2019-12-04 04:24:29
My jcrop code $(function(){ // Create variables (in this scope) to hold the API and image size var jcrop_api, boundx, boundy, // Grab some information about the preview pane $preview = $('#preview-pane'), $pcnt = $('#preview-pane .preview-container'), $pimg = $('#preview-pane .preview-container img'), xsize = $pcnt.width(), ysize = $pcnt.height(); //console.log('init',[xsize,ysize]); $('#target').Jcrop({ onChange: updateInfo, onSelect: updateInfo, onRelease: clearInfo, setSelect: [0, 0, 150, 180], boxWidth: 400, boxHeight: 300, allowMove: true, allowResize: true, allowSelect: true, aspectRatio

jCrop (jQuery) sometimes fails to load image/cropper area

给你一囗甜甜゛ 提交于 2019-12-03 16:51:52
问题 I've got a pretty simple problem, but I've become clueless on what is causing the problem. In one of my applications I'm using jCrop as a small add-on to crop images to fit in banners/headers etc. These steps will be taken: 1) Select an image (using CKFinder for this, CKFinder returns the image path to an input field) 2) Click a button to load the image 3) Crop the image 4) Save the image in about 75% of the cases everything goes according to plan, however the in the other 25% of the cases

Django app for image crop using a cropping tool

假如想象 提交于 2019-12-02 16:26:13
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 I think this is something that you will probably be best off writing yourself as it depends on how your data and models are layed out, whether (and where) you

How to center JQuery JCrop in the center of the picture

牧云@^-^@ 提交于 2019-11-30 13:57:08
I want to start JCrop selection in the center of the picture. Is there a way to do it? Is there a option or something? It's not specified in the manual. Do we have to calculate it manually? In case you are not able to figure out how to set the selection in the centre : Check the setting options http://deepliquid.com/content/Jcrop_Manual.html#Setting_Options Something like this (taken from the API ref) : <script language="Javascript"> jQuery(function($) { $('#target').Jcrop({ onSelect: showCoords, bgColor: 'black', bgOpacity: .4, setSelect: [ x, y, x1, y1 ], aspectRatio: 16 / 9 }); }); </script

How do I remove jcrop?

心不动则不痛 提交于 2019-11-30 12:50:14
问题 how do i un-jcrop an image? I'm adding jcrop with a; $('#imgThumbnailer').Jcrop({ onChange: statusCrop, onSelect: statusCrop, bgColor: 'black', bgOpacity: .3 }); How do I go about undoing it? Edit: $('#imgThumbnailer').attr("src", $obj.attr('thumbnailer_link')); var dlg = $("#ThumbnailDialog").dialog({ modal: false, draggable: false, position: 'center', zIndex: 99999, // Above the overlay closeText: '', width: 510, height: 500, open: function () { $('body').css("overflow", "hidden"); if ($

How do I remove jcrop?

随声附和 提交于 2019-11-30 03:17:34
how do i un-jcrop an image? I'm adding jcrop with a; $('#imgThumbnailer').Jcrop({ onChange: statusCrop, onSelect: statusCrop, bgColor: 'black', bgOpacity: .3 }); How do I go about undoing it? Edit: $('#imgThumbnailer').attr("src", $obj.attr('thumbnailer_link')); var dlg = $("#ThumbnailDialog").dialog({ modal: false, draggable: false, position: 'center', zIndex: 99999, // Above the overlay closeText: '', width: 510, height: 500, open: function () { $('body').css("overflow", "hidden"); if ($.browser.msie) { $('html').css("overflow", "hidden"); } $("#loader").show(); var ratio = parseFloat($obj

How to center JQuery JCrop in the center of the picture

☆樱花仙子☆ 提交于 2019-11-29 19:19:39
问题 I want to start JCrop selection in the center of the picture. Is there a way to do it? Is there a option or something? It's not specified in the manual. Do we have to calculate it manually? 回答1: In case you are not able to figure out how to set the selection in the centre : Check the setting options http://deepliquid.com/content/Jcrop_Manual.html#Setting_Options Something like this (taken from the API ref) : <script language="Javascript"> jQuery(function($) { $('#target').Jcrop({ onSelect:

Make Jcrop tracker not rotate when cropping a rotated image

有些话、适合烂在心里 提交于 2019-11-29 14:05:22
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 upright? My html: <div class="img-canvas" style="background-color:#cccccc;" > <img id="image_canv" src="<

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

南楼画角 提交于 2019-11-28 16:33:05
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 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() { // set default options var opt = {}; // if height and width must be exact, dont allow resizing opt