cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon MacDonald <simon.macdon...@gmail.com>
Subject Re: Should we change default camera quality?
Date Sun, 26 Jun 2016 22:32:54 GMT
+1 to change it to match the docs. Mind you it already is set to 50 in the
JS code so it's really a no-op that it is 80 in the Java code.


Simon Mac Donald
http://hi.im/simonmacdonald

On Sun, Jun 26, 2016 at 4:00 PM, Scott Bradshaw <swbradshaw@gmail.com>
wrote:

> Hi,
>
> I've recently been working on a rotation fix for the camera plugin for
> Android. There are many variables with the camera plugin and you only
> described two (quality and destination type). On Android, the reality is a
> new bitmap has to be created if a user specifies any of the following:
> DATA_URL, quality other than 100, orientation correction, target width,
> target height.
> We don't have analytics on what users are doing, but I would bet after
> looking at code examples for the camera plugin online, most often the
> quality is never 100 and FILE_URI only.
> Given all these variables, my opinion is to change it to match the docs.
>
> Scott
> Some time ago I opened this issue to set android default quality to 50 on
> the java code (it was really 50 because it was already set on the
> javascript part, so the default java value won´t take effect)
> https://issues.apache.org/jira/browse/CB-11269
>
> But Nikhil commented on the issue and I think what he said makes sense
>
> Should the default be 50? I believe the intent was that it will use lesser
> memory and hence, default of 50 is a good thing - but I did some profiling
> and setting the quality to anything but 100 on Android actually causes more
> memory consumption because the image has to be loaded as a bitmap and
> re-compressed. Setting appropriate target height & width along with
> FILE_URI is the correct way to reduce the memory requirements. I propose
> that the default be changed to 100.
>
> what do you think?
>
> I think setting the default value to 50 to reduce memory only makes sense
> in the case that the user uses DATA_URL, but we recommend not to use it
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message