mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
CB-9169 android: Fixed filetype for uncompressed images and added quirk
This commit is contained in:
parent
88592575fe
commit
2bb134bf6b
@ -408,7 +408,7 @@ Can only return photos as base64-encoded image.
|
||||
|
||||
#### Firefox OS Quirks
|
||||
|
||||
Camera plugin is currently implemented using [Web Activities](https://hacks.mozilla.org/2013/01/introducing-web-activities/).
|
||||
Camera plugin is currently implemented using [Web Activities](https://hacks.mozilla.org/2013/01/introducing-web-activities/).
|
||||
|
||||
#### iOS Quirks
|
||||
|
||||
@ -451,6 +451,8 @@ Tizen only supports a `destinationType` of
|
||||
|
||||
- `Camera.PictureSourceType.PHOTOLIBRARY` and `Camera.PictureSourceType.SAVEDPHOTOALBUM` both display the same photo album.
|
||||
|
||||
- Ignores the `encodingType` parameter if the image is unedited (i.e. `quality` is 100, `correctOrientation` is false, and no `targetHeight` or `targetWidth` are specified). The `CAMERA` source will always return the JPEG file given by the native camera and the `PHOTOLIBRARY` and `SAVEDPHOTOALBUM` sources will return the selected file in its existing encoding.
|
||||
|
||||
#### BlackBerry 10 Quirks
|
||||
|
||||
- Ignores the `quality` parameter.
|
||||
|
@ -85,7 +85,7 @@ Can only return photos as base64-encoded image.
|
||||
|
||||
#### Firefox OS Quirks
|
||||
|
||||
Camera plugin is currently implemented using [Web Activities](https://hacks.mozilla.org/2013/01/introducing-web-activities/).
|
||||
Camera plugin is currently implemented using [Web Activities](https://hacks.mozilla.org/2013/01/introducing-web-activities/).
|
||||
|
||||
#### iOS Quirks
|
||||
|
||||
@ -128,6 +128,8 @@ Tizen only supports a `destinationType` of
|
||||
|
||||
- `Camera.PictureSourceType.PHOTOLIBRARY` and `Camera.PictureSourceType.SAVEDPHOTOALBUM` both display the same photo album.
|
||||
|
||||
- Ignores the `encodingType` parameter if the image is unedited (i.e. `quality` is 100, `correctOrientation` is false, and no `targetHeight` or `targetWidth` are specified). The `CAMERA` source will always return the JPEG file given by the native camera and the `PHOTOLIBRARY` and `SAVEDPHOTOALBUM` sources will return the selected file in its existing encoding.
|
||||
|
||||
#### BlackBerry 10 Quirks
|
||||
|
||||
- Ignores the `quality` parameter.
|
||||
|
@ -162,6 +162,13 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
this.targetHeight = -1;
|
||||
}
|
||||
|
||||
// We don't return full-quality PNG files. The camera outputs a JPEG
|
||||
// so requesting it as a PNG provides no actual benefit
|
||||
if (this.targetHeight == -1 && this.targetWidth == -1 && this.mQuality == 100 &&
|
||||
!this.correctOrientation && this.encodingType == PNG && this.srcType == CAMERA) {
|
||||
this.encodingType = JPEG;
|
||||
}
|
||||
|
||||
try {
|
||||
if (this.srcType == CAMERA) {
|
||||
this.callTakePicture(destType, encodingType);
|
||||
|
Loading…
Reference in New Issue
Block a user