Winleafs icon indicating copy to clipboard operation
Winleafs copied to clipboard

ScreenMirrorStretch algorithm Out of Bounds

Open Svenyie opened this issue 4 years ago • 2 comments

When selecting the stretch algorithm my shapes won't work. after looking in the log i found this error. Fit or Ambilight does work.

screenres: 3840x1080

2021-07-22 01:12:45.8995|ERROR|Winleafs.Wpf.Api.Effects.ScreenMirrorEffect|Unexpected error for screen mirror with algorithm ScreenMirrorStretch
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Winleafs.Wpf.Helpers.ScreenGrabber.CalculateAverageColor(IEnumerable`1 areasToCapture, Int32 minDiversion) in C:\Users\easy_\source\repos\winleafs\Winleafs\Winleafs.Wpf\Helpers\ScreenGrabber.cs:line 104
   at Winleafs.Wpf.Api.Effects.ScreenMirrorEffects.ScreenMirror.ApplyEffect() in C:\Users\easy_\source\repos\winleafs\Winleafs\Winleafs.Wpf\Api\Effects\ScreenMirrorEffects\ScreenMirror.cs:line 65
   at Winleafs.Wpf.Api.Effects.ScreenMirrorEffect.ApplyEffect() in C:\Users\easy_\source\repos\winleafs\Winleafs\Winleafs.Wpf\Api\Effects\ScreenMirrorEffect.cs:line 90

Svenyie avatar Jul 21 '21 23:07 Svenyie

Hey, thanks for the report. A few questions:

  • Do you have only 1 screen or what does your complete setup look like (including scaling percentages)?
  • Which version of Winleafs are you using?
  • Could you send me your settings file? Then I can try to reproduce the error.

StijnOostdam avatar Jul 24 '21 10:07 StijnOostdam

2 screens : main monitor (this is the monitor i want to use for screen mirror) 3840x1080 100% scaling secondary monitor (screen mirror stretch works if i select this monitor) 1920x1080 100% scaling

version 1.1.8

Settings.txt

Svenyie avatar Jul 24 '21 18:07 Svenyie