Open ease opened 3 years ago
I think you can achieve what you want with the following options:
{
transformations: {
crop: { aspectRatio: 1 / 1, force: true },
},
imageMin: [200, 200],
imageMax: [200, 200],
}
Thanks, that could solve some issues, but what if I have the area that requires 300px width and 200px height image and I want users to crop their image within those dimensions? I know it's aspectRatio: 1.5 / 1
but it doesn't work the way I want it, because crop rectangle:
aspectRatio: 1.5 / 1
:
To be more precise, I think Filestack needs an option to:
transformations
, so it's like:
transformations: {
crop: {
force: true,
aspectRatio: 1.5 / 1,
showSelectionDim: true, // to show what selection we're making
disableDimChange: true, // to disallow user to change selection, but only move the predefined rectangle
roundSelection: true, // to round 600.23 to 600, if possible
}
}
Is there any chance to set the options within![image](https://user-images.githubusercontent.com/9357793/112132202-a1415480-8bca-11eb-9d66-cae57e72bbff.png)
PickerOptions
to require files that meet specific criteria, such as i.e. 300x200px PNG? Or if it's not met then it opens crop UI with fixed selection that's 300x200px so that user can crop the image based on that.I'm aware of
imageDim
,imageMin
andimageMax
options, but it always respect the original aspect ratio, while I need to allow a user to choose the area within the image they've uploaded, and still fixing the rectangle selection to i.e. 300x200px rectangle? Such as avatars, etc...