Trying to find browser/OS of the other user. Our quick fix is to be more tolerant and accept images 2 pixels larger/wider in either direction (so we now accept an uploaded image of width between 278 and 282 and height between 294 and 298) to account for the fact that cropit might send us an image slightly off by one pixel (we made it a to avoid the ache to the users IF EVER some browser messes it by 2 pixels).Īny ideas? Has anyone seen this? You think it's a browser thing too? Oh, and I heard back from one user, they are using Firefox on Windows10 (from a screenshot, need to get FF version). For those users, cropit sends an image of width=279 and height=295. But some users, when going through the UI infact get the validation error because the image that the UI (cropit) is sending to the backend is off by one pixel in width and height. My backend code validates that, in fact, an image of that width/height comes in and no user should ever get a backend validation error telling the user that the image is of the wrong size (unless they circumvent the UI and try funny things, in which case they'd get the validation error). The problem: our code tells cropit to export the image with width: 280 and height: 296. So, I'm guessing this might be a problem on a specific browser/OS combination. Only 2 users (out of 900 users) reported this: cropit export sends an image that is off by one pixel in width and height. If (imageSize.width > previewSize.Hi! We have a strange issue. Var previewSize = $form.cropit('previewSize') Var imageSize = $form.cropit('imageSize') PHP code that I use to save data in file:,By setting the preview area to that value, the image size changes which for some reason degrades the image a lot, making it appear almost blurry.,By setting the preview area to 300px by 300px, the image is converted into that size, and then in my case converted to base64 and uploaded.,Is there a way to retain the image quality even though the image is resized? var $form = $('.') ,This website works best with JavaScript enabled. I am trying to use a for loop in javascript to create a a table that displays * and for each row the columns increase by 1 * When the form is submitted I see the new image called ‘data.png’ but I see all black, don’t save the image correcty or what? The folder have 777 permission.,I’m using cropit.js for upload an image with php., Install with Bower: $ bower install cropit Var imageData = $('#image-cropper').cropit('export') īest for the cases where you want users to upload images of a specific size and aspect ratio.,Drag'n'drop image into cropper.,When set to true, you can freely move the image instead of being bound to the container borders,A jQuery plugin for image cropping and zooming. Var imageData = $('.image-editor').cropit('export', ) The base64 string is just stored in a text field which php can communicate based on $_POST //Initiate Cropper I'm setting a timeout because if you don't it will send the form to php before cropit can create the base64. ,Thanks for contributing an answer to Stack Overflow!, Where developers & technologists share private knowledge with coworkers
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |