mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-15 06:37:30 -06:00
[bugfix] take into account rotation when generating thumbnail (#3147)
* take into account rotation when generating thumbnail, simplify ffprobe output to show only fields we need * only show rotation side data * remove unnecessary comment * fix code comments * remove debug logging
This commit is contained in:
parent
58f8082795
commit
368c97f0f8
4 changed files with 102 additions and 20 deletions
|
|
@ -483,7 +483,7 @@ func (suite *ManagerTestSuite) TestLongerMp4Process() {
|
|||
suite.EqualValues(float32(10), *attachment.FileMeta.Original.Framerate)
|
||||
suite.EqualValues(0xce3a, *attachment.FileMeta.Original.Bitrate)
|
||||
suite.EqualValues(gtsmodel.Small{
|
||||
Width: 512, Height: 281, Size: 143872, Aspect: 1.822064,
|
||||
Width: 512, Height: 281, Size: 143872, Aspect: 1.8181819,
|
||||
}, attachment.FileMeta.Small)
|
||||
suite.Equal("video/mp4", attachment.File.ContentType)
|
||||
suite.Equal("image/webp", attachment.Thumbnail.ContentType)
|
||||
|
|
@ -543,7 +543,7 @@ func (suite *ManagerTestSuite) TestBirdnestMp4Process() {
|
|||
suite.EqualValues(float32(30), *attachment.FileMeta.Original.Framerate)
|
||||
suite.EqualValues(0x11844c, *attachment.FileMeta.Original.Bitrate)
|
||||
suite.EqualValues(gtsmodel.Small{
|
||||
Width: 287, Height: 512, Size: 146944, Aspect: 0.5605469,
|
||||
Width: 287, Height: 512, Size: 146944, Aspect: 0.5611111,
|
||||
}, attachment.FileMeta.Small)
|
||||
suite.Equal("video/mp4", attachment.File.ContentType)
|
||||
suite.Equal("image/webp", attachment.Thumbnail.ContentType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue