mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
20 lines
295 B
Go
20 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
|
|
}
|