From a004488f81fcf64dd80ea44f4f481c962d197d56 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 5 Mar 2024 22:50:53 -0800 Subject: [PATCH] cleanup ImageUtils --- src/Graphics/ImageUtils.cs | 45 -------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/Graphics/ImageUtils.cs b/src/Graphics/ImageUtils.cs index cd01fc8..11ee4b7 100644 --- a/src/Graphics/ImageUtils.cs +++ b/src/Graphics/ImageUtils.cs @@ -145,51 +145,6 @@ namespace MoonWorks.Graphics Refresh.Refresh_Image_Free(pixels); } - /// - /// Decodes image data into a TransferBuffer to prepare for image upload. - /// - public static unsafe uint DecodeIntoTransferBuffer( - Span data, - TransferBuffer transferBuffer, - uint bufferOffsetInBytes, - TransferOptions option - ) { - var pixelData = GetPixelDataFromBytes(data, out var w, out var h, out var sizeInBytes); - var length = transferBuffer.SetData(new Span((void*) pixelData, (int) sizeInBytes), bufferOffsetInBytes, option); - FreePixelData(pixelData); - return length; - } - - /// - /// Decodes an image stream into a TransferBuffer to prepare for image upload. - /// - public static unsafe uint DecodeIntoTransferBuffer( - Stream stream, - TransferBuffer transferBuffer, - uint bufferOffsetInBytes, - TransferOptions option - ) { - var pixelData = GetPixelDataFromStream(stream, out var w, out var h, out var sizeInBytes); - var length = transferBuffer.SetData(new Span((void*) pixelData, (int) sizeInBytes), bufferOffsetInBytes, option); - FreePixelData(pixelData); - return length; - } - - /// - /// Decodes an image file into a TransferBuffer to prepare for image upload. - /// - public static unsafe uint DecodeIntoTransferBuffer( - string path, - TransferBuffer transferBuffer, - uint bufferOffsetInBytes, - TransferOptions option - ) { - var pixelData = GetPixelDataFromFile(path, out var w, out var h, out var sizeInBytes); - var length = transferBuffer.SetData(new Span((void*) pixelData, (int) sizeInBytes), bufferOffsetInBytes, option); - FreePixelData(pixelData); - return length; - } - /// /// Saves pixel data contained in a TransferBuffer to a PNG file. ///