mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 15:38:13 -07:00
fix panic on reading Exif
This commit is contained in:
parent
4f683f98d8
commit
a2cd58f651
1 changed files with 3 additions and 2 deletions
5
vips.go
5
vips.go
|
|
@ -228,8 +228,9 @@ func vipsExifOrientation(image *C.VipsImage) int {
|
|||
}
|
||||
|
||||
func vipsExifShort(s string) string {
|
||||
if strings.Contains(s, " (") {
|
||||
return s[:strings.Index(s, "(")-1]
|
||||
i := strings.Index(s, " (")
|
||||
if i > 0 {
|
||||
return s[:i]
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue