refactor: GIF 单独归类、跨文件系统复制回退与异常处理优化
This commit is contained in:
+1
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user