From 9d0a03c9ccce0f5b92071643715be05ff4bbe461 Mon Sep 17 00:00:00 2001 From: Marek Ossowski Date: Sun, 3 Aug 2025 21:56:31 +0200 Subject: [PATCH] Allowing to save higher resolution image from scope --- app/src/main/java/xdsopl/robot36/MainActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index 2ed2563..4f3b78b 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -551,7 +551,7 @@ public class MainActivity extends AppCompatActivity { fgColor = getColor(R.color.fg); thinColor = getColor(R.color.thin); tintColor = getColor(R.color.tint); - scopeBuffer = new PixelBuffer(640, 2 * 1280); + scopeBuffer = new PixelBuffer(640 * 2, 2 * 1280 * 2); waterfallPlotBuffer = new PixelBuffer(256, 2 * 256); peakMeterBuffer = new PixelBuffer(1, 16); imageBuffer = new PixelBuffer(800, 616); @@ -826,7 +826,11 @@ public class MainActivity extends AppCompatActivity { int height = scopeBuffer.height / 2; int stride = scopeBuffer.width; int offset = stride * scopeBuffer.line; - storeBitmap(Bitmap.createBitmap(scopeBuffer.pixels, offset, stride, width, height, Bitmap.Config.ARGB_8888)); + Bitmap bmp = Bitmap.createBitmap(scopeBuffer.pixels, offset, stride, width, height, Bitmap.Config.ARGB_8888); + if (currentMode == null || !currentMode.equals("HF Fax")) { + bmp = Bitmap.createScaledBitmap(bmp, width / 2, height / 2, true); + } + storeBitmap(bmp); } private void createScope(Configuration config) {