jcrop

Jcrop incorrect orientation from Iphone upload, how i can do?

时光毁灭记忆、已成空白 提交于 2019-12-12 16:31:25
问题 I have a site my jCrop tool that create this flow: users upload photos->they crop it->they upload it on my server The problems comes when i try tu upload a photo taken from the iphone camera. 1- If i upload the picture from an iphone, it appear correctly oriented in preview/crop mode, then after the php upload i see the result in a wrong orientation. 2- If i upload a picture taken with iphone by computer, the picture appears wrong orientated (a vertical photo comes rotated 90 degrees) in the

showing image loaded from file before upload/POST

你说的曾经没有我的故事 提交于 2019-12-12 14:21:08
问题 I have the following html code to upload an image: <input type="file" name="before" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> and I want to show the image that the user uploads before it's actually processed in the backend. How do I do this? Basically what I want to do is to upload an image from an image in your computer and show it so it can be cropped using jCrop and then process the image in the backend 回答1: Save the file on post back like normal During

Jquery JCrop functionality on fluid images

空扰寡人 提交于 2019-12-12 01:10:00
问题 So I have implemented JCrop on my image and now there has to be a design change, into making that image fluid. My image has now max-height:100%;max-width:100% and it scales accordingly without JCrop, but with JCrop it doesn't and that is because JCrop sets a fixed witdth and height to the image on intialization, eg: display: none; visibility: hidden; width:540px; height:430px; $('#feature').children('img').eq(0).removeAttr('style'); $('#feature').children('img').attr('style','display: none;

How to ensure a DOM object has rendered before calling a function on it?

天大地大妈咪最大 提交于 2019-12-11 20:38:27
问题 I'm using a jquery plugin (jcrop) which has one of its options set by the the value of a DOM element. jQuery(function($){ var CircleSel = function(){ }; CircleSel.prototype = new $.Jcrop.component.Selection(); $.extend(CircleSel.prototype,{ zoomscale: $('#img_container').data('zoomscale'), # more stuff...... The problem is that '#img_container' is only created by jcrop once the page has loaded, and so zoomscale is being set to null. I can't think of any other way to get this value — I need

Rails carrierwave + jcrop + bootstrap

谁说我不能喝 提交于 2019-12-11 05:09:00
问题 I'm using Rails 4 with gems mini_magick, carrierwave, jcrop-rails-v2 and bootstrap-sass. I have a picture upload that crops the image after save it but i need to crop it before save on a bootstrap modal. Found this tutorial: http://mark.stratmann.me/content_items/image-cropping-with-rails-3-2-carrierwave-bootstrap-modals-jcrop but I'm new on Rails and it seems to complex and I don't know how to merge this things with my code. Other thing that i need to do and don't know how, is keep the

how to fix this AngularJS JCrop directive?

喜你入骨 提交于 2019-12-11 03:09:06
问题 I'm trying to use JCrop with AngularJS. I have the following directive that I need help to fix a bit: .directive('imgCropped', function() { return { restrict: 'E', replace: true, scope: { src:'@', selected:'&' }, link: function(scope,element, attr) { var myImg; var clear = function() { if (myImg) { myImg.next().remove(); myImg.remove(); myImg = undefined; } }; scope.$watch('src', function(nv) { clear(); if (nv) { element.after('<img />'); myImg = element.next(); myImg.attr('src',nv); $(myImg)

Trouble cropping and resizing image

僤鯓⒐⒋嵵緔 提交于 2019-12-11 02:25:06
问题 I'm trying to create a thumbnail image for a larger image. I'm using Jcrop to get the co-ordinates of the crop but I can't turn this into a properly cropped thumbnail image. I've set up Jcrop properly and it's sending through x-y co-ordinates along with the size of the box but I can't work out how to crop from that. What I have is the path to an image on my server, along with 4 co-ordinates and the width and height of the square box they create (I've locked the aspect ratio to 1:1 as I want

Not cropping the selected area

半腔热情 提交于 2019-12-11 01:14:51
问题 Now comes the cropping part: Shows a different part of the image with the correct width, height. Area to be cropped Cropped Area Heres my js code jQuery(document).ready(function () { jQuery('#imgCrop').Jcrop({ onSelect: storeCoords, onChange: storeCoords }); }); function storeCoords(c) { jQuery('#X').val(c.x); jQuery('#Y').val(c.y); jQuery('#W').val(c.w); jQuery('#H').val(c.h); }; protected void btnCrop_Click(object sender, EventArgs e) { string ImageName = Session["WorkingImage"].ToString();

Using JCROP and JQUERY to crop images using from jsp..url based image source/ dynamic images not working

≯℡__Kan透↙ 提交于 2019-12-10 11:27:07
问题 i have the following code that works perfectly fine to display an image in a Jsp so that i can crop it. The code uses a static image "testpic.jpg" which works perfectly well without issues. When i attempt to use a dynamic image generated from a servlet, JCROP seems to fail to initialize so i get the images, but i will not have the cropping functionality enabled. i use <img src="displayImage?memberNumber=<%=memberNumber%>&memberSuffix=<%=memberSuffix%>&amp" id="cropbox" /> to display the

Using jCrop With Responsive Design/Fluid Width CSS

只愿长相守 提交于 2019-12-08 16:51:49
问题 I'm having trouble using Jcrop on responsive width images for the mobile version of a site. When I apply a width setting of 100% to the uploaded image - to allow a user on a mobile device the best option of providing a successful crop, the outputted crop is not the crop area chosen. This is due, I think, to jcrop working from the size of the true image, not the resized version (100% width), but I don't know how to fix it. I have seen this question (and answer)but I don't understand how to