GitHub user convey-mane opened a pull request:
https://github.com/apache/cordova-plugin-camera/pull/131
iOS: new resizable cropping rectangle instead of Apple's standard square
The title and comment of commit
https://github.com/apache/cordova-plugin-camera/commit/b324dd50f373bffcbb81233201ab9281d8781809
should tell a lot already.
On iOS there's only that very insufficient inflexible cropping _square_ â
compared to Android or WinMobile. In our App we need a flexible, sizable
_rectangle_, for which we use the for us relevant portions of
[GKImagePicker](https://github.com/gekitz/GKImagePicker) by Georg Kitz (under
MIT-License); this is also mentioned in the
[README.md](https://github.com/apache/cordova-plugin-camera/commit/36b9bc0d2f61df400f7eebe0ddc0db9b06ec4590).
To be downward compatible and to not urge others, for whom that square may
be sufficient, it is made parametrizable via a new preference (as this is iOS
specific and nothing that has to be changeable at runtime), defaulting to
false. Which is also documented in the README.md.
While we are satisfied with Apple's standard UI of the camera itself (why
develop something similar oneself?) â this brings the following problem with
it: after taking a photo, that standard UI forces you into a second screen,
which, when not wanting that cropping square, simply gives you the option to
"Retake" or "Use Photo", which is very redundant, when the next to come is
"our" new cropping rectangle.
But because there is no option to avoid this screen while using standard
UI, we have to observe an undocumented notification
(`_UIImagePickerControllerUserDidCaptureItem`), in whose selector we dig the
picture out of the camera-controller's view hierarchy, explicitly call
`didFinishPickingMediaWithInfo` and there, finally, dismiss the camera
_premature_; well, :worried:.
Hoping you like our extensions!
P.S.: Sorry for
* not labelling the commits with "iOS";
* the many changes without real changes in README.md â obviously there
were different line-endings here and there :disappointed:;
* that seesaw with the version numbering (my colleagues wanted to know
exactly what status they have).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/conveyGmbH/cordova-plugin-camera master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-camera/pull/131.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #131
----
commit b324dd50f373bffcbb81233201ab9281d8781809
Author: convey-mane <[email protected]>
Date: 2015-10-19T12:22:11Z
resizable cropping rectangle after taking photo - parametrized
If the plugin is called with option allowEdit == true, then setting
this preference to true suppresses the standard (fairly useless) square
for cropping the photo, even suppresses the (then also useless) view of
the photo with the "Retake"- and "Use Photo"-buttons, but instead
offers a resizable cropping rectangle (with "Redo" and "Save").
commit 651cc728bc5b84ca301d4493383dc08b46456994
Author: convey-mane <[email protected]>
Date: 2015-10-21T11:33:40Z
avoid a new compiler warning; more ReadMe.
commit 36b9bc0d2f61df400f7eebe0ddc0db9b06ec4590
Author: convey-mane <[email protected]>
Date: 2015-10-28T12:39:58Z
polishing the readme
commit bfbe89d08d216b24cb7e04595042a53cff3d912e
Author: convey-mane <[email protected]>
Date: 2015-10-29T09:57:14Z
wrong quote-sign
caused by "Smart-Qoute" functionality of the spell-checker.
commit b97fcabf95b251827302a07a0bf303336735d725
Author: convey-mane <[email protected]>
Date: 2015-10-30T10:23:02Z
back to original version of master
to avoid conflicts when requesting the pull.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]