mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.1.51
- Fixed image resize to maintain aspect ratio
This commit is contained in:
parent
a813f38a81
commit
c05aa4df5f
4 changed files with 6 additions and 3 deletions
|
@ -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")
|
||||
|
|
|
@ -825,7 +825,7 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
info := ServerInfo{
|
||||
Version: "0.1.4",
|
||||
Version: "0.1.51",
|
||||
RegistrationEnabled: registrationEnabled,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue