![]() ![]() Founded in 2019, CropIT was initially launched as a digital and monitoring company for smallholder financiers. ![]() I've been searching the internet for a while now and cannot find anything that tells me how I turn the result from $('#image-cropper').cropit('export') into an image that PHP can upload to the server. Our vision is to enable 10 million small-scale farmers in Africa to fulfil their economic potential by 2030. Src:'users/'+username+'/profile_picture.jpg' I'm using the Cropit plugin and all I need is an image that I can pass into my php upload script. $('#image-cropper').cropit('previewSize', ) A tag already exists with the provided branch name. The issues is that im getting a Data URI instead of an actual file upload and that the U. Var imageData = $('#image-cropper').cropit('export') Include the jQuery javascript library and the jQuery cropit plugin in your Html page. Im trying to figure out how I can upload a profile image to my database within my asp.net mvc web project. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Create the Html for a basic image cropper with a zoom slider. The code here is working properly for the plugin but I'm unable to turn the result which looks something like data:image/png base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD. ![]() into an image that I can use in a php script. The way I got it to work is by messing around with the quality settings of Cropit and creating a PHP function that reads the base64 string and converts it to an image. but after uploading image the final image gets resized to bigger size. I'm setting a timeout because if you don't it will send the form to php before cropit can create the base64. say i have uploaded png image with size 9kb it gets converted to 60kb after successful upload. What format the plugin is exporting to is up to you to investigate. If you require different parts of each page to be cropped, we recommend splitting the file before manually cropping each page.I have read in few articles that adjusting quality param can control quality and size of image but no change getting happened. Once you switch from file input to hidden field, you won't able able to accept HttpPostedFileBase but rather a string containing an exported binary data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |