[ 
https://issues.apache.org/jira/browse/CB-6190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Youval Bronicki updated CB-6190:
--------------------------------

    Description: 
When calling  navigator.camera.getPicture with default options except for 
quality, the requested quality is ignored.

There is a simple work-around, replacing lines 314-315 in CDVCamera.m,  :

{quote}
// use image unedited as requested , don't resize
data = UIImageJPEGRepresentation(returnedImage, 1.0);
{quote}

with:
{quote}
// use image unedited as requested , don't resize (with compression)
data = UIImageJPEGRepresentation(returnedImage, cameraPicker.quality / 100.0f);
{quote}

However, the code hints there may be some (undocumented?) intention to minimize 
processing in some situations, so this may not be a full fix.

  was:
When calling  navigator.camera.getPicture with default options except for 
quality, the requested quality is ignored.

There is a simple work-around, replacing lines 314-315 in CDVCamera.h,  :

{quote}
// use image unedited as requested , don't resize
data = UIImageJPEGRepresentation(returnedImage, 1.0);
{quote}

with:
{quote}
// use image unedited as requested , don't resize (with compression)
data = UIImageJPEGRepresentation(returnedImage, cameraPicker.quality / 100.0f);
{quote}

However, the code hints there may be some (undocumented?) intention to minimize 
processing in some situations, so this may not be a full fix.


> navigator.camera.getPicture ignores quality parameter when width/height are 
> not specified
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-6190
>                 URL: https://issues.apache.org/jira/browse/CB-6190
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin Camera
>            Reporter: Youval Bronicki
>
> When calling  navigator.camera.getPicture with default options except for 
> quality, the requested quality is ignored.
> There is a simple work-around, replacing lines 314-315 in CDVCamera.m,  :
> {quote}
> // use image unedited as requested , don't resize
> data = UIImageJPEGRepresentation(returnedImage, 1.0);
> {quote}
> with:
> {quote}
> // use image unedited as requested , don't resize (with compression)
> data = UIImageJPEGRepresentation(returnedImage, cameraPicker.quality / 
> 100.0f);
> {quote}
> However, the code hints there may be some (undocumented?) intention to 
> minimize processing in some situations, so this may not be a full fix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to