mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-22 04:52:51 +08:00
prevent the creation of picture bigger than original for android
This commit is contained in:
parent
569b069a03
commit
67755254fc
@ -1076,8 +1076,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
* @return
|
||||
*/
|
||||
public int[] calculateAspectRatio(int origWidth, int origHeight) {
|
||||
int newWidth = this.targetWidth;
|
||||
int newHeight = this.targetHeight;
|
||||
int newWidth = Math.min(this.targetWidth, origWidth);
|
||||
int newHeight = Math.min(this.targetHeight, origHeight);
|
||||
|
||||
// If no new width or height were specified return the original bitmap
|
||||
if (newWidth <= 0 && newHeight <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user