You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/10/14 16:11:54 UTC
cordova-plugin-camera git commit: CB-6190 - iOS camera plugin ignores
quality parameter
Repository: cordova-plugin-camera
Updated Branches:
refs/heads/master 837d6721f -> b8a68af63
CB-6190 - iOS camera plugin ignores quality parameter
CB-6190 - iOS camera plugin ignores quality parameter in some
circunstances
Added a check to not downscale if quality is 100 or sourceType !=
UIImagePickerControllerSourceTypeCamera (according to the docs, images
from gallery aren’t downscaled). This closes #108
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/b8a68af6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/b8a68af6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/b8a68af6
Branch: refs/heads/master
Commit: b8a68af63ffb86712941a74884ebd0e32c9a8178
Parents: 837d672
Author: Julio César <jc...@gmail.com>
Authored: Tue Jul 14 20:53:40 2015 +0200
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Wed Oct 14 17:09:44 2015 +0300
----------------------------------------------------------------------
src/ios/CDVCamera.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/b8a68af6/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index fc2df33..ce40b0b 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -346,7 +346,7 @@ static NSString* toBase64(NSData* data) {
break;
case EncodingTypeJPEG:
{
- if ((options.allowsEditing == NO) && (options.targetSize.width <= 0) && (options.targetSize.height <= 0) && (options.correctOrientation == NO)){
+ if ((options.allowsEditing == NO) && (options.targetSize.width <= 0) && (options.targetSize.height <= 0) && (options.correctOrientation == NO) && (([options.quality integerValue] == 100) || (options.sourceType != UIImagePickerControllerSourceTypeCamera))){
// use image unedited as requested , don't resize
data = UIImageJPEGRepresentation(image, 1.0);
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org