tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Support HEIC/HEIF images on Windows 10

Open DJ-ZX opened this issue 5 years ago • 53 comments

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

DJ-ZX avatar Dec 26 '18 12:12 DJ-ZX

one caveat: I believe HEIF/HEIC support in Windows 10 requires the purchase of the $0.99 "HEVC Extension" app from the Windows store.

sturmen avatar Nov 13 '19 13:11 sturmen

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)

DJ-ZX avatar Nov 13 '19 14:11 DJ-ZX

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

tooomm avatar Nov 15 '19 19:11 tooomm

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!

stale[bot] avatar Oct 24 '20 07:10 stale[bot]

issue still exists - cannot attach heif file from any device or even created and edited on Windows as picture in TD

DJ-ZX avatar Oct 24 '20 11:10 DJ-ZX

I don't think this would be implemented without support from Qt side

ilya-fedin avatar Oct 24 '20 12:10 ilya-fedin

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!

stale[bot] avatar Apr 22 '21 15:04 stale[bot]

Issue still remains in newer versions ot Telegram despite Windows natively supports HEIF and even extends support.

DJ-ZX avatar May 13 '21 07:05 DJ-ZX

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 avatar Jan 12 '22 07:01 smasharov

@smasharov The preview is generated by the sender, so that is sort of expected while the format isn't known to the app.

john-preston avatar Jan 12 '22 07:01 john-preston

I have opened the BUG

smasharov avatar Jan 12 '22 07:01 smasharov

What's the point in opening duplicates when you know there's already an issue? :see_no_evil:

ilya-fedin avatar Jan 12 '22 09:01 ilya-fedin

it is not a complete duplicate and this issue is not solved for more than years

smasharov avatar Jan 12 '22 12:01 smasharov

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.

ilya-fedin avatar Jan 12 '22 12:01 ilya-fedin

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 avatar Jan 12 '22 12:01 smasharov

@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 ¯_(ツ)_/¯

john-preston avatar Jan 12 '22 12:01 john-preston

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)

DJ-ZX avatar Jan 12 '22 12:01 DJ-ZX

@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.

john-preston avatar Jan 12 '22 12:01 john-preston

but OS have support of HEIC files and they are opened by Telegram in the native windows App.

smasharov avatar Jan 12 '22 12:01 smasharov

@smasharov What do you mean by "HEIC files are shown correctly in the Telegram App"?

john-preston avatar Jan 12 '22 12:01 john-preston

I have made corrections in my previous message.

smasharov avatar Jan 12 '22 12:01 smasharov

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.

john-preston avatar Jan 12 '22 12:01 john-preston

We just need to create the small preview by Qt plugin, I think it is worth to at least to try to do it.

smasharov avatar Jan 12 '22 12:01 smasharov

The plugin linked above is "with known bugs", another one requires additional libraries to be built.

john-preston avatar Jan 12 '22 12:01 john-preston

Qt allows to enable HEIF support but with known bugs

You mean without third-party plugins? If yes, how to enable it?

ilya-fedin avatar Jan 12 '22 12:01 ilya-fedin

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

smasharov avatar Jan 12 '22 12:01 smasharov

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

ilya-fedin avatar Jan 12 '22 13:01 ilya-fedin

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

ilya-fedin avatar Jan 12 '22 13:01 ilya-fedin

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.

ilya-fedin avatar Jan 12 '22 13:01 ilya-fedin

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

DJ-ZX avatar Jan 12 '22 13:01 DJ-ZX