2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-27 15:07:24 +00:00

Make GIFs and videos with captions larger.

This commit is contained in:
John Preston
2022-09-05 19:03:52 +04:00
parent 9ef2f370ac
commit d6ba092697
21 changed files with 410 additions and 253 deletions

View File

@@ -482,6 +482,10 @@ bool RotationSwapWidthHeight(int rotation) {
return (rotation == 90 || rotation == 270);
}
QSize TransposeSizeByRotation(QSize size, int rotation) {
return RotationSwapWidthHeight(rotation) ? size.transposed() : size;
}
bool GoodStorageForFrame(const QImage &storage, QSize size) {
return !storage.isNull()
&& (storage.format() == kImageFormat)