diff options
author | 2024-07-19 15:28:43 +0000 | |
---|---|---|
committer | 2024-07-19 17:28:43 +0200 | |
commit | 50c9b5498b9be266bd04278a97978e38984424a2 (patch) | |
tree | a371b4b5b8796af3f8262916c69e53b9c1e5af24 /internal/api/client/media | |
parent | [docs] update README with our corporate sponsorship policy (#3112) (diff) | |
download | gotosocial-50c9b5498b9be266bd04278a97978e38984424a2.tar.xz |
[feature] use webp for thumbnails (#3116)
* update to use webp for thumbnails
* bump webp quality up to 40% from 12% (it's a bit different to jpeg quality setting)
* update to use yuva colorspace, and use thumbnail=n=10 to select frame
* fix missing comma in ffmpeg args
* add links to appropriate ffmpeg docs
* update tests
* add file size tests for thumbnails
---------
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/api/client/media')
-rw-r--r-- | internal/api/client/media/mediacreate_test.go | 4 | ||||
-rw-r--r-- | internal/api/client/media/mediaupdate_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go index 2f6813a7c..c256d18dc 100644 --- a/internal/api/client/media/mediacreate_test.go +++ b/internal/api/client/media/mediacreate_test.go @@ -206,7 +206,7 @@ func (suite *MediaCreateTestSuite) TestMediaCreateSuccessful() { Y: 0.5, }, }, *attachmentReply.Meta) - suite.Equal("LjCGfG#6RkRn_NvzRjWF?urqV@a$", *attachmentReply.Blurhash) + suite.Equal("LcBzLU#6RkRn~qvzRjWF?urqV@jc", *attachmentReply.Blurhash) suite.NotEmpty(attachmentReply.ID) suite.NotEmpty(attachmentReply.URL) suite.NotEmpty(attachmentReply.PreviewURL) @@ -291,7 +291,7 @@ func (suite *MediaCreateTestSuite) TestMediaCreateSuccessfulV2() { Y: 0.5, }, }, *attachmentReply.Meta) - suite.Equal("LjCGfG#6RkRn_NvzRjWF?urqV@a$", *attachmentReply.Blurhash) + suite.Equal("LcBzLU#6RkRn~qvzRjWF?urqV@jc", *attachmentReply.Blurhash) suite.NotEmpty(attachmentReply.ID) suite.Nil(attachmentReply.URL) suite.NotEmpty(attachmentReply.PreviewURL) diff --git a/internal/api/client/media/mediaupdate_test.go b/internal/api/client/media/mediaupdate_test.go index bb260ae4d..43b2b6c51 100644 --- a/internal/api/client/media/mediaupdate_test.go +++ b/internal/api/client/media/mediaupdate_test.go @@ -175,7 +175,7 @@ func (suite *MediaUpdateTestSuite) TestUpdateImage() { suite.EqualValues("image", attachmentReply.Type) suite.EqualValues(apimodel.MediaMeta{ Original: apimodel.MediaDimensions{Width: 800, Height: 450, FrameRate: "", Duration: 0, Bitrate: 0, Size: "800x450", Aspect: 1.7777778}, - Small: apimodel.MediaDimensions{Width: 256, Height: 144, FrameRate: "", Duration: 0, Bitrate: 0, Size: "256x144", Aspect: 1.7777778}, + Small: apimodel.MediaDimensions{Width: 512, Height: 288, FrameRate: "", Duration: 0, Bitrate: 0, Size: "512x288", Aspect: 1.7777778}, Focus: &apimodel.MediaFocus{X: -0.1, Y: 0.3}, }, *attachmentReply.Meta) suite.Equal(toUpdate.Blurhash, *attachmentReply.Blurhash) |