Commit 148ea78
committed
fix(image): detect image format by content instead of suffix
Prioritize content-based format detection to support opening
images with modified file extensions.
优先通过文件内容检测格式,支持打开修改后缀的图片文件。
Log: 修复修改后缀后图片无法打开的问题
PMS: BUG-355941
Influence: 修改文件后缀的图片现在可以正常打开,提升用户体验。1 parent 0e90e77 commit 148ea78
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
212 | 221 | | |
213 | 222 | | |
214 | 223 | | |
| |||
0 commit comments