mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Ambient 1 zone improve (#1635)
* .... * Amvietn: improved color for 1-zone
This commit is contained in:
@@ -627,14 +627,13 @@ namespace GHelper.USB
|
|||||||
bound.Y += bound.Height / 3;
|
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
|
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;
|
Bitmap screeb_pxl;
|
||||||
|
|
||||||
int zones = AURA_ZONES;
|
int zones = AURA_ZONES;
|
||||||
|
|
||||||
if (isStrix) // laptop with lightbar
|
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
|
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_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));
|
var mid_right = ColorUtils.GetMidColor(screeb_pxl.GetPixel(2, 1), screeb_pxl.GetPixel(3, 1));
|
||||||
@@ -650,7 +649,6 @@ namespace GHelper.USB
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
zones = 1;
|
zones = 1;
|
||||||
screen_low = AmbientData.CamptureScreen(bound, 256, 144);
|
|
||||||
screeb_pxl = AmbientData.ResizeImage(screen_low, 1, 1);
|
screeb_pxl = AmbientData.ResizeImage(screen_low, 1, 1);
|
||||||
AmbientData.Colors[0].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(0, 0), (float)0.3);
|
AmbientData.Colors[0].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(0, 0), (float)0.3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user