修复无法识别部分svg图片的类型

Signed-off-by: zenggaofeng <zenggaofeng2@h-partners.com>
This commit is contained in:
zenggaofeng 2023-12-27 10:45:15 +08:00
parent 34a121d454
commit 796646d282
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
## 2.1.2-rc.2 ## 2.1.2-rc.2
- HSP兼容性优化 - HSP兼容性优化
- 暴露DetachFromLayout接口 - 暴露DetachFromLayout接口
- 修复无法识别部分svg图片的类型
## 2.1.2-rc.1 ## 2.1.2-rc.1
- 修复断网状态下错误展位图不显示 - 修复断网状态下错误展位图不显示

View File

@ -22,7 +22,7 @@ export class FileTypeUtil {
'png': [new Uint8Array([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])], 'png': [new Uint8Array([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])],
'gif': [new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x39, 0x61])], 'gif': [new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x39, 0x61])],
'bmp': [new Uint8Array([0x42, 0x4D])], 'bmp': [new Uint8Array([0x42, 0x4D])],
'svg': [new Uint8Array([0x3C, 0x3F, 0x78, 0x6D, 0x6C])], 'svg': [new Uint8Array([0x3C, 0x3F, 0x78, 0x6D, 0x6C]),new Uint8Array([0x3C, 0x73, 0x76, 0x67, 0x20])],
'webp': [new Uint8Array([0x52, 0x49, 0x46, 0x46])], 'webp': [new Uint8Array([0x52, 0x49, 0x46, 0x46])],
'tiff': [new Uint8Array([0x49, 0x20, 0x49]), new Uint8Array([0x49, 0x49, 0x2A, 0x00]), new Uint8Array([0x4D, 0x4D, 0x00, 0x2A]), new Uint8Array([0x4D, 0x4D, 0x00, 0x2B])], 'tiff': [new Uint8Array([0x49, 0x20, 0x49]), new Uint8Array([0x49, 0x49, 0x2A, 0x00]), new Uint8Array([0x4D, 0x4D, 0x00, 0x2A]), new Uint8Array([0x4D, 0x4D, 0x00, 0x2B])],
// 添加更多的文件类型和特征 // 添加更多的文件类型和特征