mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-15 10:25:55 -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 {
|
func vipsExifShort(s string) string {
|
||||||
if strings.Contains(s, " (") {
|
i := strings.Index(s, " (")
|
||||||
return s[:strings.Index(s, "(")-1]
|
if i > 0 {
|
||||||
|
return s[:i]
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue