PLT-4277: Allow larger custom emojis by resizing (#4447)
Add function to resize image using resize.Thumbnail. Add function to resize gif using previous function. Add function to convert image.Image to image.Palleted. Add logic to identify image type and resize them if they are larger than MaxEmojiHeight or MaxEmojiWidth. Also increase MaxEmojiFileSize. * fix: Add github.com/nfnt to vendor * fix: Fix max file size and if logic in resizeEmoji * test: Fix and add new tests for new resize feature * fix: Fix and update translations to fit new feature * fix: Add requested changes
Этот коммит содержится в:
коммит произвёл
enahum
родитель
9b7e2e50e3
Коммит
48d64f3f68
18
i18n/en.json
18
i18n/en.json
@@ -791,7 +791,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.create.too_large.app_error",
|
||||
"translation": "Unable to create emoji. Image must be less than 64 KB in size."
|
||||
"translation": "Unable to create emoji. Image must be less than 1 MB in size."
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.delete.permissions.app_error",
|
||||
@@ -822,8 +822,20 @@
|
||||
"translation": "Unable to create emoji. File must be a PNG, JPEG, or GIF."
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.upload.large_image.app_error",
|
||||
"translation": "Unable to create emoji. Image must be at most 128 by 128 pixels."
|
||||
"id": "api.emoji.upload.large_image.decode_error",
|
||||
"translation": "Unable to create emoji. An error occurred when trying to decode the image."
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.upload.large_image.encode_error",
|
||||
"translation": "Unable to create emoji. An error occurred when trying to encode the image."
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.upload.large_image.gif_decode_error",
|
||||
"translation": "Unable to create emoji. An error occurred when trying to decode the GIF image."
|
||||
},
|
||||
{
|
||||
"id": "api.emoji.upload.large_image.gif_encode_error",
|
||||
"translation": "Unable to create emoji. An error occurred when trying to encode the GIF image."
|
||||
},
|
||||
{
|
||||
"id": "api.file.get_file.public_disabled.app_error",
|
||||
|
||||
Ссылка в новой задаче
Block a user