From c713a9514dbf6b12e2806331d2bb00b8a2e48800 Mon Sep 17 00:00:00 2001 From: jas88 Date: Mon, 9 Oct 2023 21:20:42 -0500 Subject: [PATCH] ImageSharp API fixup --- TemplateBuilder/DicomFileTagsUI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TemplateBuilder/DicomFileTagsUI.cs b/TemplateBuilder/DicomFileTagsUI.cs index d99c6c9..98daffb 100644 --- a/TemplateBuilder/DicomFileTagsUI.cs +++ b/TemplateBuilder/DicomFileTagsUI.cs @@ -39,9 +39,9 @@ protected override void OnLoad(EventArgs e) { using var renderedImage = new DicomImage(dicom.Dataset).RenderImage().AsSharpImage(); using MemoryStream ms = new(); - renderedImage.Save(ms,renderedImage.GetConfiguration().ImageFormatsManager.FindEncoder(PngFormat.Instance)); + renderedImage.Save(ms,renderedImage.GetConfiguration().ImageFormatsManager.GetEncoder(PngFormat.Instance)); ms.Seek(0, SeekOrigin.Begin); - DicomImage = new(ms); + DicomImage = new Bitmap(ms); pictureBox1.Image = DicomImage; } catch (Exception)