- Fixed image resize to maintain aspect ratio
This commit is contained in:
Daniel Mason 2022-01-08 22:41:32 +13:00
parent a813f38a81
commit c05aa4df5f
4 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@ stages:
- build
variables:
VERSION: 0.1.4
VERSION: 0.1.51
build-go:
image: golang:1.17

View File

@ -1,3 +1,6 @@
# 0.1.51
- Fixed image resize to maintain aspect ratio
# 0.1.5
- Add image upload endpoints for artist/albums @ v1/albums/{uuid}/upload

View File

@ -114,7 +114,7 @@ func resizeImage(uuid string, size int) bool {
}
// Resize image to specified size
resizedImage := imaging.Resize(src, size, size, imaging.Lanczos)
resizedImage := imaging.Resize(src, size, 0, imaging.Lanczos)
// Save resized image
err = imaging.Save(resizedImage, DataDirectory+string(os.PathSeparator)+"img"+string(os.PathSeparator)+uuid+"_300px.jpg")

View File

@ -825,7 +825,7 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
}
info := ServerInfo{
Version: "0.1.4",
Version: "0.1.51",
RegistrationEnabled: registrationEnabled,
}