mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
21 lines
295 B
Go
21 lines
295 B
Go
package file
|
|
|
|
// VisualFile is an interface for files that have a width and height.
|
|
type VisualFile interface {
|
|
File
|
|
GetWidth() int
|
|
GetHeight() int
|
|
GetFormat() string
|
|
}
|
|
|
|
func GetMinResolution(f VisualFile) int {
|
|
w := f.GetWidth()
|
|
h := f.GetHeight()
|
|
|
|
if w < h {
|
|
return w
|
|
}
|
|
|
|
return h
|
|
}
|