[MM-62191] Remove disintegration/imaging dependency (#29657)

* Remove disintegration/imaging dependency

* Simplify FillCenter logic

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Claudio Costa
2025-02-02 23:34:00 -06:00
коммит произвёл GitHub
родитель 28dbc3cabb
Коммит 316cde2569
29 изменённых файлов: 468 добавлений и 22 удалений

Просмотреть файл

@@ -18,7 +18,7 @@ import (
"net/http"
"path"
"github.com/disintegration/imaging"
"github.com/mattermost/mattermost/server/v8/channels/app/imaging"
_ "golang.org/x/image/webp"
"github.com/mattermost/mattermost/server/public/model"
@@ -337,7 +337,7 @@ func resizeEmoji(img image.Image, width int, height int) image.Image {
if emojiHeight <= MaxEmojiHeight && emojiWidth <= MaxEmojiWidth {
return img
}
return imaging.Fit(img, MaxEmojiWidth, MaxEmojiHeight, imaging.Lanczos)
return imaging.Fit(img, MaxEmojiWidth, MaxEmojiHeight)
}
func imageToPaletted(img image.Image) *image.Paletted {