Merge pull request 'fix: wrong png header' (#91) from awalol/cli:fix-png into master
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #91
This commit is contained in:
周训 2024-05-03 08:47:13 +00:00
commit fb07697afa

View File

@ -3,7 +3,7 @@ package sniff
// ref: https://mimesniff.spec.whatwg.org
var imageMIMEs = map[string]Sniffer{
"image/jpeg": prefixSniffer{0xFF, 0xD8, 0xFF},
"image/png": prefixSniffer{'P', 'N', 'G', '\r', '\n', 0x1A, '\n'},
"image/png": prefixSniffer{0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n'},
"image/bmp": prefixSniffer("BM"),
"image/webp": prefixSniffer("RIFF"),
"image/gif": prefixSniffer("GIF8"),