9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2024-10-06 02:12:07 +08:00

Use the density to display the picture like in the webview and update the plugin version.

This commit is contained in:
Christophe BOUCAUT 2015-06-26 17:56:29 +02:00
parent 4590d51f94
commit 08773e2c24
2 changed files with 3 additions and 3 deletions

View File

@ -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"
>
<name>GeneanetCustomCamera</name>
<description>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.</description>

View File

@ -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;