mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-11-29 18:38:08 +08:00
.NET5^ support image ReadOnlySpan<byte>
This commit is contained in:
parent
ae4e68fbf8
commit
361fb964f4
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 1.32.1
|
||||||
|
- [New] .NET5^ support image `ReadOnlySpan<byte>`
|
||||||
|
|
||||||
### 1.32.0
|
### 1.32.0
|
||||||
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 1.32.1
|
||||||
|
- [New] .NET5^ support image `ReadOnlySpan<byte>`
|
||||||
|
|
||||||
### 1.32.0
|
### 1.32.0
|
||||||
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 1.32.1
|
||||||
|
- [New] .NET5^ support image `ReadOnlySpan<byte>`
|
||||||
|
|
||||||
### 1.32.0
|
### 1.32.0
|
||||||
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
- [New] Using DynamicConfiguration when writing data using DataTable (via @pszybiak)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
namespace MiniExcelLibs.Utils
|
namespace MiniExcelLibs.Utils
|
||||||
{
|
{
|
||||||
|
using System;
|
||||||
internal class ImageHelper
|
internal class ImageHelper
|
||||||
{
|
{
|
||||||
public enum ImageFormat
|
public enum ImageFormat
|
||||||
@ -47,8 +48,7 @@
|
|||||||
return ImageFormat.unknown;
|
return ImageFormat.unknown;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if NET5_0_OR_GREATER
|
||||||
#if NET5_0
|
|
||||||
public static ImageFormat GetImageFormat(ReadOnlySpan<byte> bytes)
|
public static ImageFormat GetImageFormat(ReadOnlySpan<byte> bytes)
|
||||||
{
|
{
|
||||||
ReadOnlySpan<byte> bmp = stackalloc byte[] { (byte)'B', (byte)'M' }; // BMP
|
ReadOnlySpan<byte> bmp = stackalloc byte[] { (byte)'B', (byte)'M' }; // BMP
|
||||||
|
Loading…
Reference in New Issue
Block a user