move away from icon.ExtractAssociatedIcon because it always extracts the 32x32 icon, but the stream deck has a 48x48 space for the icon

This commit is contained in:
2023-10-03 23:21:19 -06:00
parent 4c1ccd9025
commit 4ca0ad021f
3 changed files with 272 additions and 2 deletions

View File

@ -4,6 +4,7 @@ using System.Linq;
using BarRaider.SdTools;
using System.Drawing;
using System.Runtime.InteropServices;
using FocusVolumeControl.UI;
namespace FocusVolumeControl.AudioSessions;
@ -31,8 +32,9 @@ public sealed class ActiveAudioSessionWrapper : IAudioSession
}
else
{
var tmp = Icon.ExtractAssociatedIcon(ExecutablePath);
_icon = Tools.ImageToBase64(tmp.ToBitmap(), true);
var tmp = IconExtraction.GetIcon(ExecutablePath);
//var tmp = Icon.ExtractAssociatedIcon(ExecutablePath);
_icon = Tools.ImageToBase64(tmp, true);
}
}
catch