ngImgCrop
ngImgCrop copied to clipboard
get position and size of selection area
Is there any way to get the current size of the selection area and its position relative to the original image? Would me most useful indeed!
I would like this also... it would be great to have another attr specified IE:
<img-crop
image="{string}"
result-image="{string}"
...
area-coords="{expression}"
></img-crop>
where img-crop would assign the coordinates to a variable specified in the expression.
I could see coordinates as:
{top, left, width, height}
I could start putting together a pull request if you haven't already started!
Thanks for the great code, @alexk111
+1 on this - would be great to see the size of the cropped image as you crop. Like tooltips stating the w/h in pxs @alexk111 great work indeed
any update on it?
+1 please
+1. Size especially since if larger than e.g. mvc maxJsonLength the request would fail not even reaching the actions. Unless there is a way today even using dataUris? I guess if the result image can be the File object somehow, then the size would be possible to obtain (according to MDN Blob.size)
+1 You may want to store the original and create higher res crops in the future. Or you may want to have additional (e.g. small, medium, and large) crops which could be done on the server side.
+1 on this too. Would be very useful
+1. I think the crop info was part of 'crop result',it's will be very useful.
+1 I think there is a PR here: https://github.com/alexk111/ngImgCrop/pull/7 What are the chances, that this gets merged?
I had a look into https://github.com/alexk111/ngImgCrop/pull/7/commits and https://github.com/alexk111/ngImgCrop/pull/56 but it seems, that they don't provide x, y and size values relative to the original images resolution.
What would be a good way to implement this?
+1 for #7 @alexk111 :)
+1!
+1
For those interested, I've forked the repo to add the expected feature at https://github.com/Javarome/ngImgCrop See demo at http://codepen.io/Javarome/pen/RPLZvd
Thank you very much @Javarome. I will be using your forked version of the lib from now on.
@Javarome I don't even know if your lib is what i need. All i really want is to prevent the lib changing the result-image to 200x200? Is there any simple way to do this? I have been struggling all night.