You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by julio cesar sanchez <jc...@gmail.com> on 2016/06/26 10:46:29 UTC

Should we change default camera quality?

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

Re: Should we change default camera quality?

Posted by julio cesar sanchez <jc...@gmail.com>.
I already changed it to match the docs long time ago, that's not the topic
I want to discuss.

This topic is to discuss what Nikhil said about if it still makes sense to
set the default quality to 50.
Scott made a good point too

2016-06-27 0:32 GMT+02:00 Simon MacDonald <si...@gmail.com>:

> +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 <sw...@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
> >
>

Re: Should we change default camera quality?

Posted by Simon MacDonald <si...@gmail.com>.
+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 <sw...@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
>

Re: Should we change default camera quality?

Posted by Scott Bradshaw <sw...@gmail.com>.
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