Commit Graph

110 Commits

Author SHA1 Message Date
John Preston
6805259f74 Don't recompress some JPEGs when sending as photos.
If JPEG is saved in progressive mode and has bpp <= 4
and max(width, height) <= 1280 then we send original bytes.
2022-03-09 17:37:51 +04:00
23rd
5718789d53 Replaced Ui::InformBox and Ui::ConfirmBox with GenericBox. 2022-02-28 09:08:01 +03:00
John Preston
8b7d2c880e Support rendering Webm videos with alpha. 2022-01-28 19:10:07 +03:00
John Preston
3ff17a8789 Refactor image transformation interfaces. 2022-01-21 15:33:44 +03:00
23rd
f8be5731a5 Moved out extracting of attached stickers from Scene to FileLoadTask. 2022-01-12 11:54:25 +03:00
John Preston
53c15ed2ac Make SendingAlbum::Item::Item non-inline. 2021-11-18 11:04:18 +04:00
John Preston
c534f3f22e Some internal HistoryItem refactoring.
Replace most IsServerMsgId / id <=> 0 with isRegular().
Track isLocal / isHistoryEntry in flags.
Remove toHistoryMessage.
2021-11-07 12:50:13 +04:00
Ilya Fedin
847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
23rd
159beb138a Moved api peer photo processing to separated file.
Removed MainWidget::deletePhotoLayer.
2021-10-20 22:56:19 +03:00
23rd
80461bd9fe Moved ConfirmBox to Ui namespace. 2021-10-19 06:34:27 +03:00
23rd
6148edbc7d Moved ConfirmBox to td_ui. 2021-10-19 06:34:27 +03:00
John Preston
84f561b251 Don't use MTP* in the image editor. 2021-10-04 23:47:33 +04:00
John Preston
19ce1edc16 Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were
in video streaming, see commits 27d58ba07b, 8f5830d520.

Now the crashes happened in the ConvertScale() call from a background
thread when preparing an image from clipboard for sending to a chat.
2021-09-27 12:13:57 +04:00
John Preston
8069fdd873 Use base/random.h instead of openssl::RandomValue. 2021-09-15 13:42:22 +03:00
John Preston
c79cd0b692 Use Images::Read instead of App::readImage. 2021-08-11 18:55:08 +03:00
23rd
832dd8d50c Moved some photo editor files to separate directories. 2021-07-06 12:13:05 +03:00
23rd
e05343d721 Added sending info of stickered photos. 2021-07-06 12:13:05 +03:00
John Preston
3ec3f6484f Update API scheme to layer 128. 2021-04-06 18:41:15 +04:00
23rd
d4bb62d055 Slightly refactored uploading of edit media. 2021-03-13 12:59:11 +03:00
Ilya Fedin
23272430b4 Build with QT_NO_KEYWORDS 2021-03-04 12:07:54 +04:00
Ilya Fedin
bbf49b024a Fix implicit conversions from QByteArray 2021-02-19 14:15:09 +04:00
John Preston
ce1b94eb16 Send PDFs only as files.
Fixes #10294.
2021-02-05 13:18:11 +04:00
23rd
d4bbbdb65c Replaced rand_value util function with openssl::RandomValue. 2021-01-24 10:41:10 +03:00
John Preston
ed50aa0d8e Fix build with Qt < 5.14. 2020-11-17 17:14:21 +03:00
John Preston
02eea38724 Remove color space before sending in JPG. 2020-11-16 14:22:19 +03:00
John Preston
202534575b Allow many previews in SendFilesBox. 2020-10-30 18:32:19 +03:00
John Preston
c2f0bcf933 Keep first game sticker frames inside the binary. 2020-10-30 18:32:19 +03:00
John Preston
64ac6b18bf Move SingleMediaPreview to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
b3b11bd9e7 Move PreparedFile/PreparedList to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
f0e1d2fd02 'base::optional_variant<' -> 'std::variant<v::null_t,' 2020-09-29 19:03:19 +03:00
John Preston
437c9320cd Implement progressive jpeg loading and sending. 2020-09-29 19:03:18 +03:00
John Preston
1a9c241b96 Update API scheme to layer 116. 2020-07-25 11:24:11 +04:00
23rd
5c097887ef Added ability to edit media in scheduled messages. 2020-07-17 18:22:38 +03:00
John Preston
9463bbd266 Fix animated stickers with wrong dimensions. 2020-07-17 08:13:45 +04:00
John Preston
8aafe6ba0e Show only box(512,512) .webp as stickers. 2020-07-15 22:31:42 +04:00
John Preston
2df5972f68 Raise file size limit to 2000 MB. 2020-07-08 10:07:01 +04:00
John Preston
f450f81215 Remove non-UI calls to App::main. 2020-06-23 21:53:40 +04:00
John Preston
0ad7dcaef9 Remove MTP::MainInstance() global access point. 2020-06-23 21:53:40 +04:00
John Preston
4b354b0928 Use Main::Session in download/upload. 2020-06-23 21:53:38 +04:00
John Preston
bdbcd8e540 Use Main::Session in entities parsing. 2020-06-08 12:05:17 +04:00
John Preston
803593cd8d Change Stickers::Set from value to object type. 2020-06-01 18:09:33 +04:00
John Preston
74ef8104a7 Fix photo edit caption box, remove 's' size. 2020-06-01 18:09:32 +04:00
John Preston
33c1c48ad9 Update API scheme to layer 114. 2020-06-01 18:09:31 +04:00
John Preston
33f4946242 Start using document bytes from DocumentMedia. 2020-06-01 18:09:30 +04:00
VictorienXP
85fcec2fb5 Add .opus and .oga files as song formats 2020-04-21 14:04:51 +04:00
John Preston
c83e297554 Implement dice media display. 2020-03-27 20:36:02 +04:00
23rd
d1d5312ead Moved searching of sticker mimes to single place. 2020-01-23 10:09:33 +03:00
John Preston
a6c84c36c0 Use layers and boxes from lib_ui. 2019-10-19 12:27:52 +04:00
John Preston
849deb57e2 Move many widget classes to lib_ui. 2019-10-01 23:59:46 +03:00
John Preston
0c713a930a Remove app.h / facades.h from precompiled header. 2019-10-01 23:59:46 +03:00