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:
parent
4590d51f94
commit
08773e2c24
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user