tdesktop
tdesktop copied to clipboard
Support HEIC/HEIF images on Windows 10
Steps to reproduce
- 1 Take a picture on iPhone, download it to local storage
- 2a Copy picture to clipboard (for ex. from MS Photos app, open picture from library and copy from menu or with Ctrl+C, works with JPG perfectly)
- 2b Go to Telegram and try to paste image (Ctrl+V) or
- 3 Use open dialog and try to select any HEIC file
Expected behaviour
Image should be attached as picture with ability to add comment
Actual behaviour
HEIC/HEIF files attached just as files
Configuration
Operating system: Windows 10 (any), HEIF codecs for all aps and even 3rd party for Desktop apps (includimg Windows Photo Viewer desktop app) installed, system supports HEIF files Version of Telegram Desktop: 1.5.x latest beta
Note: Unigram supports HEIF files, but Unigram still has tons of other limitations. Note2: looks it's valid for Android app too
one caveat: I believe HEIF/HEIC support in Windows 10 requires the purchase of the $0.99 "HEVC Extension" app from the Windows store.
one caveat: I believe HEIF/HEIC support in Windows 10 requires the purchase of the $0.99 "HEVC Extension" app from the Windows store.
not exactly - normally it's "preinstalled" by vendor and it enables writing but viewing is free - https://www.microsoft.com/en-us/p/heif-image-extensions/9pmmsr1cgpwg?lc=1033&activetab=pivot:overviewtab . But in any case - now it supported also on samsung phones and surface duo which are "MS supported" so change that users will move to HEIF images (videos is a separate problem) groving for windows users as well. Telegram Desktop still the main client (Unigram has limitations) so this is differently something to take a look to.
Same for Android app (I will submit beta feedback there as well)
I believe HEIF/HEIC support in Windows 10 requires the purchase of the $0.99 "HEVC Extension"
Some people might need it, depending on their windows version. But it's free. Also check https://www.windowscentral.com/how-open-heic-and-hevc-files-windows-10s-photos-app#install_heif_codec_windows10
Hey there!
This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
issue still exists - cannot attach heif file from any device or even created and edited on Windows as picture in TD
I don't think this would be implemented without support from Qt side
Hey there!
This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
Issue still remains in newer versions ot Telegram despite Windows natively supports HEIF and even extends support.
If I send HEIC file directly from iPhone it has the preview, even on desktop version, but if I send it from the desktop client the preview is missing on all of the devices and clients.
Telegram Desktop 3.4.3
@smasharov The preview is generated by the sender, so that is sort of expected while the format isn't known to the app.
I have opened the BUG
What's the point in opening duplicates when you know there's already an issue? :see_no_evil:
it is not a complete duplicate and this issue is not solved for more than years
It's a complete duplicate since both issues are requesting HEIC/HEIF support. And it won't be supported since Qt doesn't support that format.
Maybe it is a Qt issue, but the files send from iOS devices have preview and they are correctly displayed on the Desktop version. So what is the problem to create previews on the Desktop version? Or at least have ability to generate them on the iOS device after the files were send from the Desktop client?
@smasharov The sender generates a preview and sends it in JPG format. iOS app generates previews because it can read HEIF. Desktop app doesn't generate previews because it can't. iOS app doesn't generate previews for received files without previews because.. it doesn't. It can be a feature request for the iOS app, but it is irrelevant in this bugtracker. And I think they'll answer that it is the sender-s job to generate previews. And they're right ¯_(ツ)_/¯
It's a complete duplicate since both issues are requesting HEIC/HEIF support. And it won't be supported since Qt doesn't support that format.
it's not fully true - Qt allows to enable HEIF support but with known bugs in it but also there is 3rd party open source module that can be used https://github.com/jakar/qt-heif-image-plugin
The core issue here that Win10/11 platforms already natively supports HEIF/HEIC/HEVC, so if you have any of most popular smartphones (Apple or Samsung, which both have those formats support) and you want to keep them offline w/o converting to JPEG - makes hard to use Telegram Desktop to send them. So "native converting" to JPEG under the hood will work too, but having support for formats will be amazing overall. Like native app a bit more that Unigram for numerous reasons, so do not want to switch (now using both only because of HEIF)
@smasharov A (one) feature request for HEIF support can be left opened in this repository, but I can't tell if and when this feature request will be implemented.
but OS have support of HEIC files and they are opened by Telegram in the native windows App.
@smasharov What do you mean by "HEIC files are shown correctly in the Telegram App"?
I have made corrections in my previous message.
Yes, because native windows app supports this format.
Telegram Desktop uses Qt API QImageReader to read images, which doesn't have support for HEIC format although the system has the codecs.
We just need to create the small preview by Qt plugin, I think it is worth to at least to try to do it.
The plugin linked above is "with known bugs", another one requires additional libraries to be built.
Qt allows to enable HEIF support but with known bugs
You mean without third-party plugins? If yes, how to enable it?
so https://github.com/novomesk/qt-heic-image-plugin is also not usable? For me it is strange that Desktop version supports hevc/h265 and do not support HEIF/HEIC
so https://github.com/novomesk/qt-heic-image-plugin is also not usable?
Having third-party Qt plugins made by noname developers in official builds is probably not a good idea
For me it is strange that Desktop version supports hevc/h265 and do not support HEIF/HEIC
Videos are read with ffmpeg, images are read with QImage
KDE community has https://invent.kde.org/frameworks/kimageformats library that offers support for a number of modern image formats. If it supported HEIF/HEIC, it were possible to use it and get support for a number of formats at once. But it doesn't support HEIF/HEIC, unfortunately.
The plugin linked above is "with known bugs", another one requires additional libraries to be built.
any plugin may have the known bugs, the question - is it applicable and secure or not, if not - clear why to not use it, if yes - could be the way
I agree there is no fast solution, but this is a big limitation since more devices incorporate heif formats and raised not today. So problem is not new and from Qt bugtracker https://bugreports.qt.io/browse/QTBUG-69212 I see that they are aware on that but doing nothing to finalize and fix (I did not find any notice). Also using diffrerent image reading lib could be solution