Hi I want to get X,Y,W,H of the cropped image on cropping.how would I achieve this using croppie plugin.I get cropped points as top left corner points and bottom right corner points but I do not know how to get width, height,X and Y points of the cropped images.
You just subtract the left coords from the right coords to get the width and height.
var info = $('.croppie-image').croppie('get');
var top_left_x = info.points[0];
var top_left_y = info.points[1];
var bottom_right_x = info.points[2];
var bottom_right_y = info.points[3];
var cropped_width = bottom_right_x - top_left_x;
var cropped_height = bottom_right_y - top_left_y;
Thanks @kellishaver
Most helpful comment
You just subtract the left coords from the right coords to get the width and height.