9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00

Maintien de la photo quand on tourne l'appareil

This commit is contained in:
Thomas BOY
2014-12-17 16:29:44 +01:00
parent 6a8795d195
commit 0528bd1a8d
@@ -727,10 +727,8 @@ public class CameraActivity extends Activity {
float ratioX = (float) displayWidthPx / (float) widthBackground;
float ratioY = (float) displayHeightPx / (float) heightBackground;
if (ratioX < ratioY && ratioX < 1) {
System.out.println("OK");
newBitmap = Bitmap.createScaledBitmap(bitmap, (int) displayWidthPx, (int) (ratioX * heightBackground), false);
} else if (ratioX >= ratioY && ratioY < 1) {
System.out.println("OK2");
newBitmap = Bitmap.createScaledBitmap(bitmap, (int) (ratioY * widthBackground), (int) displayHeightPx, false);
}