diff --git a/plugin.xml b/plugin.xml index 6b7f5c9..813f6a7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="org.geneanet.customCamera" - version="0.1.0" + version="0.1.1" > GeneanetCustomCamera This cordova plugin is an alternative to the official cordova plugin (camera). It starts a custom camera: image overlay with an opacity slider, user-defined color of the buttons, activating/deactivating functions. diff --git a/src/android/customCamera/src/org/geneanet/customcamera/BitmapUtils.java b/src/android/customCamera/src/org/geneanet/customcamera/BitmapUtils.java index bdd4a8b..fff3190 100644 --- a/src/android/customCamera/src/org/geneanet/customcamera/BitmapUtils.java +++ b/src/android/customCamera/src/org/geneanet/customcamera/BitmapUtils.java @@ -42,8 +42,8 @@ public class BitmapUtils { Options options = BitmapUtils.determineOriginalSizePicture(data); int widthResize = 0; int heightResize = 0; - int widthBackground = options.outWidth; - int heightBackground= options.outHeight; + int widthBackground = (int) (options.outWidth * displayMetrics.density); + int heightBackground= (int) (options.outHeight * displayMetrics.density); float ratioX = (float) widthBackground / (float) displayWidthPx; float ratioY = (float) heightBackground / (float) displayHeightPx; int inSampleSize = 1;