From 4e46a20effc29550d34071d2e488a8dedddb2be0 Mon Sep 17 00:00:00 2001 From: DLdota Date: Wed, 22 Nov 2023 21:51:11 +0200 Subject: [PATCH] Ambient 1 zone improve (#1635) * .... * Amvietn: improved color for 1-zone --- app/USB/Aura.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/USB/Aura.cs b/app/USB/Aura.cs index 9c0290c1..ba35c21d 100644 --- a/app/USB/Aura.cs +++ b/app/USB/Aura.cs @@ -627,14 +627,13 @@ namespace GHelper.USB bound.Y += bound.Height / 3; bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel - Bitmap screen_low; + Bitmap screen_low = screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 ; Bitmap screeb_pxl; int zones = AURA_ZONES; if (isStrix) // laptop with lightbar { - screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar var mid_left = ColorUtils.GetMidColor(screeb_pxl.GetPixel(0, 1), screeb_pxl.GetPixel(1, 1)); var mid_right = ColorUtils.GetMidColor(screeb_pxl.GetPixel(2, 1), screeb_pxl.GetPixel(3, 1)); @@ -650,7 +649,6 @@ namespace GHelper.USB else { zones = 1; - screen_low = AmbientData.CamptureScreen(bound, 256, 144); screeb_pxl = AmbientData.ResizeImage(screen_low, 1, 1); AmbientData.Colors[0].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(0, 0), (float)0.3); }