refactor: GIF 单独归类、跨文件系统复制回退与异常处理优化

This commit is contained in:
2025-03-12 21:01:04 +08:00
parent 9ed579d04e
commit 0ebd84d3fe
6 changed files with 83 additions and 14 deletions
+1 -2
View File
@@ -47,8 +47,7 @@ func ReadBmpImage(filePath string) (error, int32, int32) {
// Check if it's a valid BMP file by verifying the file type.
if string(fileHeader.FileType[:]) != "BM" {
fmt.Printf("=== Not a valid BMP file: %v\n", err)
return err, 0, 0
return fmt.Errorf("not a valid BMP file: file type is %q, expected \"BM\"", string(fileHeader.FileType[:])), 0, 0
}
// Read the info header.