This commit is contained in:
Razmoth
2022-11-03 19:32:12 +04:00
parent c257f5669c
commit 3be27949f8
34 changed files with 390 additions and 421 deletions

View File

@@ -45,9 +45,9 @@ namespace AssetStudio
public static byte[] ConvertToBytes<TPixel>(this Image<TPixel> image) where TPixel : unmanaged, IPixel<TPixel>
{
if (image.TryGetSinglePixelSpan(out var pixelSpan))
if (image.DangerousTryGetSinglePixelMemory(out var pixelSpan))
{
return MemoryMarshal.AsBytes(pixelSpan).ToArray();
return MemoryMarshal.AsBytes(pixelSpan.Span).ToArray();
}
return null;
}