cropit icon indicating copy to clipboard operation
cropit copied to clipboard

Using PHP library to crop the image

Open salahy2 opened this issue 8 years ago • 2 comments

Hello, I am using this library http://image.intervention.io/api/crop to crop the image, it take x and y, I tried to use the offsets but they are wrong, can anyone help me ?

Thanks

salahy2 avatar Jun 12 '17 11:06 salahy2

To find offset you can use api onOffsetChange. To find the width and height you can user api onImageLoaded like this

onImageLoaded = function() {
    console.log(this.$preview.width());
    console.log(this.$preview.height());
};

FahriDevZ avatar Sep 29 '17 08:09 FahriDevZ

@Fahri5567 your code provide height and width of original image, not the croped image height and widht?

hamzazafeer avatar Jan 19 '18 13:01 hamzazafeer