diff --git a/OpenDreamRuntime/Objects/DreamIcon.cs b/OpenDreamRuntime/Objects/DreamIcon.cs index 4d8320433c..e491281f42 100644 --- a/OpenDreamRuntime/Objects/DreamIcon.cs +++ b/OpenDreamRuntime/Objects/DreamIcon.cs @@ -5,7 +5,7 @@ using OpenDreamShared.Dream; using OpenDreamShared.Resources; using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Formats.Png; +using SixLabors.ImageSharp.Formats.Png.Chunks; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; using Color = Robust.Shared.Maths.Color; @@ -116,22 +116,21 @@ public IconResource GenerateDMI() { } } - Image dmiImage = Image.LoadPixelData(pixels, span, frameHeight); + Image dmiImage = Image.LoadPixelData(pixels, span, frameHeight); ParsedDMIDescription newDescription = new() {Width = frameWidth, Height = frameHeight, States = dmiStates}; PixelArrayPool.Return(pixels, clearArray: true); - using (MemoryStream dmiImageStream = new MemoryStream()) { - var pngTextData = new PngTextData("Description", newDescription.ExportAsText(), null, null); - var pngMetadata = dmiImage.Metadata.GetPngMetadata(); - pngMetadata.TextData.Add(pngTextData); + using var dmiImageStream = new MemoryStream(); + var pngTextData = new PngTextData("Description", newDescription.ExportAsText(), null, null); + var pngMetadata = dmiImage.Metadata.GetPngMetadata(); + pngMetadata.TextData.Add(pngTextData); - dmiImage.SaveAsPng(dmiImageStream); + dmiImage.SaveAsPng(dmiImageStream); - IconResource newResource = _resourceManager.CreateIconResource(dmiImageStream.GetBuffer(), dmiImage, newDescription); - _cachedDMI = newResource; - return _cachedDMI; - } + IconResource newResource = _resourceManager.CreateIconResource(dmiImageStream.GetBuffer(), dmiImage, newDescription); + _cachedDMI = newResource; + return _cachedDMI; } public void ApplyOperation(IDreamIconOperation operation) { diff --git a/RobustToolbox b/RobustToolbox index 73357f022b..e357dada65 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 73357f022ba3a0b60587b602f68e160df6d79648 +Subproject commit e357dada656776118c7cd05a8effaaaca74e8f9c