mirror of https://github.com/stashapp/stash.git
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
|
||
|
}
|