mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 04:52:24 -05:00
[chore] add some more slice related utility functions + remove duplicated functions (#3149)
This commit is contained in:
parent
a237e2b295
commit
47c26818d6
7 changed files with 216 additions and 43 deletions
|
|
@ -218,8 +218,13 @@ func (p *ProcessingMedia) store(ctx context.Context) error {
|
|||
}
|
||||
|
||||
if width > 0 && height > 0 {
|
||||
// Determine thumbnail dimensions to use.
|
||||
thumbWidth, thumbHeight := thumbSize(width, height, aspect, result.rotation)
|
||||
// Determine thumbnail dimens to use.
|
||||
thumbWidth, thumbHeight := thumbSize(
|
||||
width,
|
||||
height,
|
||||
aspect,
|
||||
result.rotation,
|
||||
)
|
||||
p.media.FileMeta.Small.Width = thumbWidth
|
||||
p.media.FileMeta.Small.Height = thumbHeight
|
||||
p.media.FileMeta.Small.Size = (thumbWidth * thumbHeight)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue