-
Notifications
You must be signed in to change notification settings - Fork 1.7k
GetData & GetImageData should also return Zoom and Rotate properties #94
Comments
|
Thank you for your response. 2 zoom: so the zoom is working differently than I thought. Eg. when I would like to set a smaller image than crop area and want to zoom it to fit or oversize the crop rectangle is not a way how this plugin can be used. 2 destroy: I am running cropper as modal and after closing modal I want to display cropped result outside preview area. To prevent display problem when reopening modal after uploading another image I have to call destroy. To get image data I call getDataURL and set it to image outside cropper html area.
If I need to preserve the result image in |
@fengyuanchen The rotation degree is so useful for me. I'll wait for future commits. Tks! |
@JadaVonRuth Once you get the base64 image by "getDataURL", you can destroy the cropper directly, and you can store the base64 image in anywhere you want. |
The rotation degree can be got by "getImageData" method now. |
Amazing @fengyuanchen! 🍻 |
Tihis work is briliant and I am happy I found it. I would like to add some recommendations. When a user modifies original picture via cropper and wants to process final changes on a file not by javascript but on server side via ajax or whatever, there would be great to have all properties that has changed since image was loaded. It means also rotation (degrees) and relative zoom against original in case there were used. Without it I cannot perform same visual changes in all cases. Because visually changed image in browser I cannot upload - at least I do not know of that option. And I also noticed when I destroy instance of Cropper, generated image data url via GetDataUrl "disposes" with it and if there is in html image node using that data it disappears with it too. Maybe it is just Mozilla problem, maybe of all browsers I did test that.
The text was updated successfully, but these errors were encountered: