Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[camera] Resolution #1837

Closed
wants to merge 6 commits into from
Closed

[camera] Resolution #1837

wants to merge 6 commits into from

Conversation

raymondr
Copy link

Prior to this change there was no way to control resolution of captured images on Android.
This created different behavior from iOS where resolutionPreset is honored.

Description

This modifies existing behavior where we were ignoring ResolutionPreset for image capture on Android. Users will capture different size images based on what they pass in. Before they always got
the largest image possible.

Related Issues

Fixes
#20222 Camera plugin ignoring resolutionPreset

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • [ x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [ x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • [ x] All existing and new tests are passing.
  • [ x] I updated/added relevant documentation (doc comments with ///).
  • [ x] The analyzer (flutter analyze) does not report any problems on my PR.
  • [ x] I read and followed the Flutter Style Guide.
  • [ x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • [ x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • [ x] I updated CHANGELOG.md to add a description of the change.
  • [ x] I signed the CLA.
  • [ x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • [x ] No, this is not a breaking change.

Prior to this change there was not way to control resolution of captured image.
This created different behavior from iOS where resolutionPreset is honored.
Prior to this change there was not way to control resolution of captured image.
This created different behavior from iOS where resolutionPreset is honored.
@collinjackson collinjackson changed the title Resolution [camera] Resolution Jul 11, 2019
@mklim
Copy link
Contributor

mklim commented Jul 23, 2019

Thanks for the contribution!

This PR isn't trivial to review and we've begun refactoring the camera plugin as a whole, so I'm labeling it with "backlog". We will prioritize creating a temporary hotfix with this PR according to the issue's priority.

Relevant issues:

flutter/flutter#20222

@mklim mklim removed their request for review February 14, 2020 22:13
@danielroek
Copy link
Contributor

Doing a quick test on Android I find that taking a picture with ResolutionPreset.medium results in:
I/flutter (28622): File length is 120227
And taking a picture with ResoultionPreset.ultraHigh results in:
I/flutter (28622): File length is 1664740
Look like this PR is no longer needed

@Hixie
Copy link
Contributor

Hixie commented Oct 12, 2021

I'm going to close this since it seems to no longer be needed per the last comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants