Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
imysl0 opened this issue May 29, 2024 · 6 comments
Open

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

imysl0 opened this issue May 29, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@imysl0
Copy link

imysl0 commented May 29, 2024

  • Operating System (Windows):
  • Delta Chat Version:1.44.1
  • Expected behavior: PNG images can be previewed
  • Actual behavior: PNG images cannot be previewed
  • Steps to reproduce the problem: The issue consistently arises when sending the image without compression.
  • Screenshots:
    image
    image

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
Copy link
Author

imysl0 commented May 29, 2024

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

@Simon-Laux Simon-Laux added the bug Something isn't working label May 30, 2024
@maxphilippov
Copy link
Collaborator

@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
Copy link
Author

imysl0 commented Jul 2, 2024

@maxphilippov

  • Although its suffix is .png, I suspect it's actually a HEIF image file.

  • My friend sent this to me, and he most likely downloaded it from the Chinese version of TikTok, which is called Douyin, or from Xiaohongshu (Little Red Book). Owing to the explosion and chaos of information flow, the original download page has been lost in the river of time, rendering it irrecoverable and beyond tracing.

  • On my Windows 11 PC, I can open it without any special action; the system previews it directly or allows me to open it with the built-in Paint app. It's quite puzzling. After searching online, it might be related to my having installed the HEIF Image Extensions (though I don't recall doing so).

image

@maxphilippov
Copy link
Collaborator

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.

@maxphilippov maxphilippov changed the title Some PNG images cannot be previewed in the PC client. HEIF images cannot be previewed in the PC client. Jul 3, 2024
@iequidoo
Copy link

iequidoo commented Jul 3, 2024

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
Copy link
Author

imysl0 commented Jul 4, 2024

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

  • I saved this image from the chat window (even though it couldn't be displayed), and then on a Windows system, it opened normally with no change in size. @maxphilippov
  • It seems this situation is indeed rare; whether to address it is up to you. It's not urgent or necessary. Fine-tuning details might be better handled when there are more resources available.
  • Thank you very much for your response and for providing patient explanations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants