My 2c on this is that camera is a mess and I doubt it'd be worth time
looking at it (beyond fixing bugs from PRs).

Instead, it would be better to invest in chopping it up into several
usefull-on-their-own plugins. E.g.:
- A plugin that can fire intents and receive the result via
onActivityResult (even after app eviction)
   - This could then be used to implement starting the camera / gallery, as
well as to implement CROP if desired
- A plugin that can do simple image manipulation
   - E.g. resize, downsample (canvas isn't very good at this still thanks
to a lack of toBlob())
- A plugin for moving files around... oh wait, we already have this :)

On Wed, Apr 1, 2015 at 9:27 AM, Ian Clelland <iclell...@chromium.org> wrote:

> > >>> >> On Tue, Mar 31, 2015 at 10:38 AM, Joe Bowser <bows...@gmail.com>
> > wrote:
> > >>> >> > Hey
> > >>> >> >
> > >>> >> > I'm working on Camera plugin issues in JIRA, and I noticed that
> we
> > >>> added
> > >>> >> > Crop to the Camera plugin.  I'm wondering when this was done,
> and
> > >>> where
> > >>> >> the
> > >>> >> > JIRA issue or discussion of adding this feature took place.  I'm
> > >>> pretty
> > >>> >> > sure this feature wasn't added properly to Android, since it
> > seems to
> > >>> >> > interrupt how the camera works pretty substantially.
> > >>> >> >
> > >>> >> > Can anyone direct me to where any of this took place so that I
> can
> > >>> read
> > >>> >> the
> > >>> >> > justification as to why we added it?  If it doesn't exist, I'm
> > >>> probably
> > >>> >> > going to create a JIRA issue for putting it in properly, since
> I'm
> > >>> sure
> > >>> >> > some users are expecting it.
> > >>> >> >
> > >>> >> > Joe
>
> A little bit of git-blame work brings up this JIRA issue:
> https://issues.apache.org/jira/browse/CB-6546
>
> Which is tied to this GitHub pull request from an outside contributor:
> https://github.com/apache/cordova-plugin-camera/pull/12
>
> from just over a year ago.
>
> It looks like it was merged in on April 29 last year, and first released
> with 0.3.0 (June 2014).
>
> On Tue, Mar 31, 2015 at 6:58 PM, Joe Bowser <bows...@gmail.com> wrote:
>
> > OK, so here's the problem with allowEdit/Crop on Android as it's
> currently
> > implemented:
> >
> > 1. The results aren't handled correctly when using handleCrop and
> > saveImageToGallery
> > 2. The cropped image isn't saved to the gallery when we're saving the
> image
> > 3. I have no idea where the resizing should happen when we're allowing
> the
> > edit, currently it happens BEFORE Crop, which I don't think is right.
> > 4. Saving the image to the gallery happens BEFORE the Crop, which seems
> > like the incorrect behaviour
> >
> > Since this code is really old, I'm thinking that we're stuck with it
> since
> > it'll probably be as much work to rip the damn thing out as it would be
> to
> > fix it, but I'm not sure what "fixed" even means in this context since I
> > didn't even really know this feature existed until today when I decided
> to
> > adopt a bunch of Camera bugs and try to reproduce and fix them.  I was
> > hoping that we had these conversations before cramming this feature into
> > Cordova, but apparently we haven't.
> >
> > There's also the fact that Crop makes this plugin handle three different
> > types of intents, which I'm not super happy about, especially since I
> have
> > no idea what happens to the Exif when it goes into the Crop Intent and
> when
> > it comes out.
> >
> > Then there's the fact that this feature was an API change that broke
> > semver.  Does anyone know how semver works for plugins? Does each
> plugin's
> > version need to be updated if we muck about with the API? Would our users
> > notice if we did that? I'm hoping they would, but I'm not sure.
> >
> > On Tue, Mar 31, 2015 at 2:24 PM Raymond Camden <raymondcam...@gmail.com>
> > wrote:
> >
> > > Oh sorry - your last paragraph makes it clear that it is a doc issue
> > > w/ Android then. (Possibly anyway.)
> > >
> > > On Tue, Mar 31, 2015 at 4:22 PM, Raymond Camden <
> raymondcam...@gmail.com
> > >
> > > wrote:
> > > > I'm confused. The docs say allowEdit is ignored for Android (and
> every
> > > > other platform but iOS I believe). Are you saying allowEdit does
> > > > something for Android?
> > > >
> > > > On Tue, Mar 31, 2015 at 4:15 PM, Jesse <purplecabb...@gmail.com>
> > wrote:
> > > >> To be correct, it is not disabled anywhere, it was previously
> > > implemented
> > > >> for iOS only.
> > > >> The iOS native camera/capture view has an additional boolean
> property
> > to
> > > >> allow the user to crop+pan a photo in place before returning to the
> > app.
> > > >> This was exposed in the cordova camera api on iOS only. In like
> 2011.
> > > >>
> > > >> More recently ( last year [1] ) the same feature landed in Android,
> > > >> however, it is not exactly the same thing.
> > > >> On Android, there is no guarantee that the Crop-Intent exists, in
> > which
> > > >> case it doesn't matter if the cordova-camera getPicture method was
> > > called
> > > >> with allowEdit or not.  Also, on some devices, there are multiple
> apps
> > > >> providing a Crop-Intent, so the user will have to choose one.
> > > >>
> > > >> There are tests for it, but of course, they are manual ...
> > > >> Should we update the docs and claim Android support for it, or does
> it
> > > have
> > > >> usability/implementation issues that make us not want it?
> > > >>
> > > >>
> > > >> [1] https://github.com/apache/cordova-plugin-camera/pull/12
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> @purplecabbage
> > > >> risingj.com
> > > >>
> > > >> On Tue, Mar 31, 2015 at 1:56 PM, Raymond Camden <
> > > raymondcam...@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> From what I could see, every platform - but iOS - has it disabled.
> > > >>> (imo, when a feature is ONE platform only, it should really be
> called
> > > >>> out earlier in the docs.) Going to make a demo now cuz I want to
> see
> > > >>> too.
> > > >>>
> > > >>> On Tue, Mar 31, 2015 at 3:06 PM, Joe Bowser <bows...@gmail.com>
> > wrote:
> > > >>> > What does allowEdit do? Does it crop across devices? The problem
> is
> > > that
> > > >>> > this is super vague and doesn't make any sense. Edit can mean
> > > anything
> > > >>> from
> > > >>> > a file permission to "Open Photoshop Mobile".  If there's a
> thread
> > > where
> > > >>> we
> > > >>> > decided on it, that'd be cool, but right now it smells like an
> > > >>> undocumented
> > > >>> > feature.
> > > >>> >
> > > >>> > On Tue, Mar 31, 2015, 11:18 AM Shazron <shaz...@gmail.com>
> wrote:
> > > >>> >
> > > >>> >> Isn't this just allowEdit?
> > > >>> >> https://github.com/apache/cordova-plugin-camera/pulls?
> > > >>> >> utf8=✓&q=is%3Apr+is%3Aclosed+crop+
> > > >>> >> <
> > > >>> https://github.com/apache/cordova-plugin-camera/pulls?
> > > utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+crop+
> > > >>> >
> > > >>> >>
> > > >>> >>
> > > >>> >> ------------------------------------------------------------
> > > ---------
> > > >>> >> To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
> > > >>> >> For additional commands, e-mail: dev-h...@cordova.apache.org
> > > >>> >>
> > > >>> >>
> > > >>>
> > > >>>
> > > >>>
> > > >>> --
> > > >>> ============================================================
> > > ===============
> > > >>> Raymond Camden, Developer Advocate for MobileFirst at IBM
> > > >>>
> > > >>> Email : raymondcam...@gmail.com
> > > >>> Blog : www.raymondcamden.com
> > > >>> Twitter: raymondcamden
> > > >>>
> > > >>>
> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
> > > >>> For additional commands, e-mail: dev-h...@cordova.apache.org
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > > --
> > > > ============================================================
> > > ===============
> > > > Raymond Camden, Developer Advocate for MobileFirst at IBM
> > > >
> > > > Email : raymondcam...@gmail.com
> > > > Blog : www.raymondcamden.com
> > > > Twitter: raymondcamden
> > >
> > >
> > >
> > > --
> > > ============================================================
> > > ===============
> > > Raymond Camden, Developer Advocate for MobileFirst at IBM
> > >
> > > Email : raymondcam...@gmail.com
> > > Blog : www.raymondcamden.com
> > > Twitter: raymondcamden
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
> > > For additional commands, e-mail: dev-h...@cordova.apache.org
> > >
> > >
> >
>

Reply via email to