deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
894 stars 166 forks source link

HEIF images cannot be previewed in the PC client. #3879

Open imysl0 opened 2 months ago

imysl0 commented 2 months ago

The files are here. To prevent the website from automatically compressing the images, I've also provided a zip archive.

png:

image_2024-05-29_08-35-40

zip :

image_2024-05-29_08-35-40.zip

imysl0 commented 2 months ago

The file displays and previews correctly on both mobile clients and Windows systems. image

maxphilippov commented 3 weeks ago

@imysl0 can you provide any information on how you made this image? Cause I'm having trouble opening this one with anything on Windows (neither Explorer, Chrome, Firefox, Python IPL, nor Windows Photos work)

imysl0 commented 3 weeks ago

@maxphilippov

image

maxphilippov commented 3 weeks ago

Thanks for clarifying this! I didn't manage to make it work (I got HEIF extension installed, but there's a chance it HEIC format which requires HEVC codec extension which I can't install right now, I know, I know it's confusing a bit).

You're on Win11, that means you got it installed by default (since 2H22 or whatever they call it).

I've renamed the issue if you don't mind. Just one last question: can you try to download it from the dialog and check if it opens?

HEIF support will probably require deltachat-core implementation @Simon-Laux, @r10s and probably adding another library? I don't know if it's actually worth it to guess format by file header in binary when uploading from UX standpoint.

iequidoo commented 3 weeks ago

The image crate used by Core doesn't support HEIF, so the first problem is that we can't recode it to reduce its size as for other formats. The second one is that apparently not all platforms support HEIF, that's why currently we use Viewtype::File for it, not Viewtype::Image. In this issue the image went to the "Images" tab only because it has ".png" extension. But maybe it's not a big problem if HEIF will be Image and just not displayed correctly? This looks not nice, but having images in the "Files" tab is not much better, moreover on platforms that are able to display them.

imysl0 commented 3 weeks ago

can you try to download it from the dialog and check if it opens?