[ 
https://issues.apache.org/jira/browse/CB-9169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999236#comment-14999236
 ] 

ASF GitHub Bot commented on CB-9169:
------------------------------------

GitHub user riknoll opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/136

    CB-9169 android: Fixed filetype for uncompressed images and added quirk

    When trying to get uncompressed images on Android using camera options like 
these:
    ``` javascript
    {
        destinationType : Camera.DestinationType.FILE_URL,
        sourceType : Camera.PictureSourceType.CAMERA,
        encodingType: Camera.EncodingType.PNG,
        quality: 100,
        saveToPhotoAlbum: true
    }
    ```
    the plugin will return a JPEG file with a .png filename. This pull request 
fixes the filename and documents the Android quirk that `encodingType` is 
ignored by the plugin on Android for uncompressed files. It currently does not 
make sense to actually provide PNG support in this case, because native camera 
apps return JPEG files and so converting to PNG does not improve quality, it 
just hurts performance. Same can be said for the gallery which just returns the 
selected file.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-9169

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/136.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 #136
    
----
commit 891b4a2d089c9deb2e4788dd5c12dff7267d38cc
Author: riknoll <[email protected]>
Date:   2015-11-10T19:50:42Z

    CB-9169 android: Fixed filetype for uncompressed images and added quirk

----


> encodingType seem only have JPG file
> ------------------------------------
>
>                 Key: CB-9169
>                 URL: https://issues.apache.org/jira/browse/CB-9169
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Camera, WP8
>    Affects Versions: 5.0.1
>         Environment: I am using Cordova Cli 5.0 with all latest core plugin
> iOS
>            Reporter: Colin Bau
>            Assignee: Jesse MacFadyen
>              Labels: Triaged, camera
>
> according to this
> https://github.com/apache/cordova-plugin-camera
> I am using
> {code:javascript}
> { destinationType : Camera.DestinationType.FILE_URL,
>   sourceType : Camera.PictureSourceType.CAMERA,
>   encodingType: Camera.EncodingType.JPEG,
>   targetWidth: 100,
>   targetHeight: 100,
>   saveToPhotoAlbum: TRUE }
> {code}
> no mater which the encodingType's value is "Camera.EncodingType.JPEG" OR 
> "Camera.EncodingType.PNG"
> finally the output file is xxx.jpg
> Android iOS WP8 all have this situation



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to