Closed baj84 closed 6 years ago
Just compute by the scale ratio:
const scaledRatio = 6000 / 500;
// cropping...
const croppedData = cropper.getData();
croppedData.x *= scaledRatio;
croppedData.y *= scaledRatio;
croppedData.width *= scaledRatio;
croppedData.height *= scaledRatio;
// upload the cropped data...
I am using the cropper to crop big images 6000 pixels+, instead of loading in such a large image i'm trying to use a smaller image (500x500px) and just stretch it (lose of quality isn't an issue), so that the cropping is still relative to the large image.
Is this possible?
Cheers