using System; using System.Collections.Generic; using System.Windows.Media; namespace InABox.WPF; public class GuidToImageSourceConverter : AbstractConverter { public Dictionary? Images { get; init; } public override ImageSource? Convert(Guid value) { if (Images?.TryGetValue(value, out byte[]? result) == true) return ImageUtils.BitmapImageFromBytes(result); return null; } }