Commit graph

42 commits

Author SHA1 Message Date
Nicolas Werner
3a6a905429
A whole new year full of excitement and possibilities! 2023-01-02 04:25:33 +01:00
Nicolas Werner
eefa6379f9
I don't see why this would have detached, but make clazy happy 2022-12-13 23:47:08 +01:00
Nicolas Werner
8356746ea4
Fix image cache pruning interval 2022-12-13 06:05:29 +01:00
Nicolas Werner
95d898e09d
Add cache pruning for old image files 2022-12-13 06:02:07 +01:00
Nicolas Werner
48ecc2b45a
fix blurry thumbnails 2022-10-27 22:53:21 +02:00
Nicolas Werner
9a90f8868f
lint 2022-10-26 01:14:46 +02:00
Nicolas Werner
b28fa86e6a
Enable -Wconversion 2022-10-26 01:10:35 +02:00
brausepulver
98de51042a
Get large avatar images as scale and crop locally (#1107)
Resolves #1069

The Matrix spec requires servers to provide thumbnails at (96x96, crop) and (320x240, scale) among others. [1] The avatars in Nheko's global/room profile and room settings are sized 130x130 on normal scaling and 260x260 on 2x scaling like on a HiDPI device. In both cases the avatar is requested as cropped and that way displayed at 96x96, making it look blurry.

This can be solved by requesting scaled avatars rather than cropped where appropriate, and cropping to the requested size afterwards.

HiDPI can be simulated in Qt by setting QT_SCALE_FACTOR=2.

[1] https://spec.matrix.org/v1.3/client-server-api/#thumbnails
2022-06-26 18:32:43 +00:00
Loren Burkholder
686ebfdbec
Add D-Bus API (#916)
This adds functionality for viewing joined rooms and activating rooms.
2022-04-14 15:02:55 +00:00
Nicolas Werner
30ba387076
Fix thumbnails of received encrypted images 2022-03-22 04:32:11 +01:00
Nicolas Werner
8d52c17f29
Work around images with size 0 in info
fixes #875
2022-01-04 05:19:48 +01:00
Nicolas Werner
61404641d9
Update year in copyright notice to shut up lint job 2022-01-01 04:57:53 +01:00
Nicolas Werner
19dc6cadea
Reserve size of some containers we are filling 2021-12-29 06:01:38 +01:00
Nicolas Werner
d8ead9573b
Reduce allocations using QStringLiteral 2021-12-29 04:52:52 +01:00
Nicolas Werner
5ca98829f7
Some qt6 prep 2021-12-28 20:09:08 +01:00
tastytea
5ac1195402
MxcImageProvider: Only use scaledToHeight if width <= 0. 2021-12-27 22:59:51 +01:00
tastytea
7086e23bdd
Request inline images in the right size and anti-alias them
- If an inline image has specified a height, add parameters to the
  image:// URI.
- Add scaled to the parameters, the images would be cropped otherwise.
- Extract the height from image:// URI and use it for requestSize.
- Use scaledToHeight instead of scaled.
2021-12-27 22:47:51 +01:00
Nicolas Werner
cf31fff5fe
Fix blurry thumbnails AGAIN 2021-12-08 23:10:19 +01:00
Nicolas Werner
07b5f0805f
Fix display of images, that can't be thumbnailed 2021-12-08 02:43:08 +01:00
Nicolas Werner
30791f7890
Get rid of threadpool for images 2021-12-08 02:43:03 +01:00
Nicolas Werner
cfca7157b9
Change indentation to 4 spaces 2021-09-18 00:45:50 +02:00
Nicolas Werner
1e7756c508
Fix dpi scaling of avatars 2021-08-16 12:48:45 +02:00
Nicolas Werner
42d2b10d5d
Round images in the image provider 2021-08-14 17:17:50 +02:00
Nicolas Werner
a57a15a2e0
Basic sticker pack editor 2021-08-06 04:31:53 +02:00
Nicolas Werner
8a300f7333
Fix some media not being cached properly
Most noticeable in the goose chooser.
2021-07-21 16:55:28 +02:00
Nicolas Werner
007ee38b04
Fix exif rotation in unencrypted rooms 2021-04-04 00:15:08 +02:00
Nicolas Werner
21562eed75
Fix shadowing 2021-03-17 20:32:12 +01:00
Nicolas Werner
e5d75c814b
Clean up notification code a bit 2021-03-17 19:18:07 +01:00
Nicolas Werner
95026dcc62
Refactor image download code to be reusable 2021-03-17 19:18:07 +01:00
Loren Burkholder
fda6d7629a
Switch readImage to take a reference instead of a pointer
There was nowhere that an actual pointer was passed, and I wanted to do references for something else.
2021-03-17 19:18:06 +01:00
Nicolas Werner
a6f0d2ea7d
Update license headers 2021-03-05 01:04:07 +01:00
Nicolas Werner
01e38d12ed Fix some compiler warnings 2020-12-25 00:08:06 +00:00
Nicolas Werner
12fff7408e Optimize build 2020-10-27 17:45:28 +01:00
Nicolas Werner
fef0cc2d71 Fix some images not showing up 2020-09-16 23:49:17 +02:00
Nicolas Werner
e5a55ab1b9 Smooth scaling for images
Fixes some issues with inline images.
2020-06-07 14:53:35 +02:00
Nicolas Werner
28adc9dc9b Respect exif rotation of images
Sometimes thumbnails still have the wrong dimensions, as they are scaled
to fit inside a rectange of the reported size in the image. Not sure,
who is wrong there, the media repo or we.
2020-04-26 11:26:51 +02:00
Nicolas Werner
79f967da8c Reduce Cache.h includes further via one forward declaration 2019-12-15 03:34:37 +01:00
Nicolas Werner
5fc1f3bd67 Reduce overhead of Cache.h 2019-12-15 02:56:04 +01:00
Nicolas Werner
5bfdaff778 Implement decryption of images
It is a bit of a hack, but it works...
2019-12-03 23:34:16 +01:00
Nicolas Werner
4f7a45a0a6 Improve avatar look and layouting
Thanks to red_sky for the feedback!
2019-11-23 20:06:15 +01:00
Nicolas Werner
8ebef4eed2 Size images/videos by timeline width 2019-11-23 20:06:15 +01:00
Nicolas Werner
ebeb1eb772 Implement avatars in qml timeline 2019-11-23 20:06:14 +01:00