Closed Zazo032 closed 1 year ago
@apalala-dev @g-apparence calling await CamerawesomePlugin.setPhotoSize(1080, 1920)
seems to do nothing, is there any way to change the final photo size with the new implementation? Final images are 4000x2250, which is too big for our use case. Tried a couple different approaches, but I couldn't find a working one
Hi, we made this on purpose.
The new version doesn't include selecting the photo size because of
For now our approach is
Would this fit your need?
@Zazo032 I just published a PR with the initial aspectRatio and with support for aspect ratio 1:1 on Android.
As @g-apparence mentioned, we don't specify photo size yet because CameraX might find a photo size with a different aspectRatio.
Would changing the jpeg quality of the output suit your need ? It might reduce the size of the file (but not its resolution).
@g-apparence Hi, makes sense the approach you followed. We implemented an extra step in our flow to compress images to our desired size. To set the aspect ratio, we're currently doing this:
CameraAwesomeBuilder.custom(
builder: (state) {
if (sensorConfig.aspectRatio != CameraAspectRatios.ratio_16_9) {
sensorConfig.setAspectRatio(CameraAspectRatios.ratio_16_9);
return ...
}
}
),
Might not be the best approach, but I think it's the only way to do it automatically right now.
Fixed by #180
Proposal
At least for now, there's no clear doc or way to set a specific initial aspect ratio and photo size