bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.64k stars 6.12k forks source link

HEIC support? #2534

Open franciscofranco opened 6 years ago

franciscofranco commented 6 years ago

Probably more a question than an actual "issue" but is HEIC support planned to be merged on this repo? Google Photos already supports HEIC so one does wonder.

Thanks for all your work into this lib.

TWiStErRob commented 6 years ago

It's a question that can turn into a feature. @sjudd is this a "help wanted" one? I guess an integration library wouldn't hurt. And finally there would be an example of how to build a custom image format lib.

sjudd commented 6 years ago

I'm limited in what I can say but:

  1. Google Photos' Android app does not support local viewing of HEIC.
  2. I do not plan to add support to Glide myself.

An integration library is an interesting idea. We'd need to be careful to make sure there are no licensing issues with either the format or any library that's used to do the actual decoding. I'd definitely be willing to take a look if someone wants to put up a pull request.

franciscofranco commented 6 years ago

Local viewing as in reading from the local storage? I haven't tested that I think. An HEIC file uploaded from my iPhone 8 to Google Photos, and then opening it from my Pixel 2016 it decodes and shows the picture. The details show it as being an HEIC file, so I can only guess that decoding being done server side or something? I understand if you can't answer due to conflict of interest with Google.

Thanks for the prompt answers though.

sjudd commented 6 years ago

Yeah if you view a local only heic (one that hasn't been backed up or uploaded) on Android I'd expect it won't work. In fact I'd expect it won't even be recognized as an image or show up in the app.

jamesjss commented 6 years ago

Hello @franciscofranco, with your Pixel 2016, if you try to share a photo in HEIC format, for example to Whatsapp, can people see the photo or send a heic file?

gajicm93 commented 6 years ago

Ok since we have a very important new development on this matter with Android P now introducing HEIC as part of platform/support libraries, does Glide change it's stance on support integration?

I do believe that HEIC would eventually replace both JPEG and WebP as the next image web standard, since it provides best compression ratio, and has such a strong support from iOS.

TWiStErRob commented 6 years ago

@gajicm93 there could be built-in integration (i.e. pass-through to BitmapFactory) I guess, but it wouldn't work pre P.

gajicm93 commented 6 years ago

@TWiStErRob so they're not planning to include decoder into support library or something? I see they have HeifWriter in support lib for encoding?

TWiStErRob commented 6 years ago

Huh, that's cool, but it feels kinda pointless without HeifReader, let's see what happens in 28.0/28.1 stable, maybe nudge them with a feature request if there isn't one already?! I'm pretty sure @sjudd will consider if support library has all the tools.

zpxshl commented 6 years ago

Do you have plans to support HEIF?

TWiStErRob commented 6 years ago

https://issuetracker.google.com/issues/111763025

StudentSort commented 5 years ago

So, how is it going with this issue?

gajicm93 commented 4 years ago

Android 10 officially supports AV1 video codec, part of which specification is also an AVIF image compression, even more advanced than HEVC compression, though still stored in HEIF file container.

Specifically: HEIC -> HEIF container with HEVC image compression. HEIF -> HEIF container with any random image compression (can be either HEVC or AVIF or even H264)

So how is this issue going, and can we supersede it with full HEIF implementation that also supports AVIF image compression (at least on Android 10 where decompression should be natively supported, but potentially even on older versions through some support library)? Issue on Googles IssueTracker seems to be moved to "Won't fix" status.

Thanks.

TWiStErRob commented 4 years ago

@sjudd what is needed to support Android 10? a new image format and header detection in Glide?

TWiStErRob commented 4 years ago

@gajicm93 re Google Issue tracker: I think they didn't understand my query, feel free to open a new issue (probably link to the old one) and see if they get it this time.