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

AVIF image support #880

Open
jae1911 opened this issue Dec 12, 2023 · 8 comments
Open

AVIF image support #880

jae1911 opened this issue Dec 12, 2023 · 8 comments
Assignees
Labels
community help welcome Issues which we are encouraging community contributions towards. New Feature A new addition, whose complexity hasn't been evaluated yet

Comments

@jae1911
Copy link

jae1911 commented Dec 12, 2023

Is your feature request related to a problem? Please describe.

When loading an AVIF image, it will appear as a file which is not expected.
Given websites like Google Images are slowly switching to it, it's frustrating to see a file pop up when trying to paste an image.

Describe the solution you'd like

The AVIF image should be displayed as an image instead of a file.

Describe alternatives you've considered

None.

Additional Context

Test image: https://sharex.777.tf/ShareX/2023/08/2023-08-24%2019.00.33.avif

2023-12-12 07 19 05

@jae1911 jae1911 added the New Feature A new addition, whose complexity hasn't been evaluated yet label Dec 12, 2023
@Frooxius
Copy link
Member

We've looked at this briefly in the past and we could potentially introduce support for this format.

Unfortunately FreeImage does not support this format, since it's relatively new.

The main thing we need is a good C# library (wrapper or native implementation) to support this format. This can be either adding support directly, or we switch away from FreeImage (which we might also do for other reasons).

However this also brings the question - how commonly is this format used? How mature is it? What benefit would there be to supporting it natively?

There are hundreds of image formats that we could potentially support, so having a bit more context on why you want this one supported would be helpful.

@shiftyscales shiftyscales removed their assignment Dec 12, 2023
@jae1911
Copy link
Author

jae1911 commented Dec 12, 2023

It's mature enough that Google has started rolling it out on Google images and that all major browsers have support for it (https://caniuse.com/?search=avif).

The benefit would be not having to convert the image to another format to display it in-game as copying images from services like google images will copy an AVIF file and converting it while in VR is hard and not practical.

@Frooxius
Copy link
Member

Frooxius commented Dec 12, 2023

@jae1911 That's good context, thank you! I think given this, we can definitely look into adding support for this natively.

No promises on when will that happen, we'll have to see if we want to swap over from FreeImage completely (which we might) and do it as part of that, or do something else, but I'd like to make it happen one way or other at some point.

@Frooxius
Copy link
Member

I think we'll probably end up using libheif directly for this right now. I've created fork of the repo here:
https://github.com/Yellow-Dog-Man/libheif

There's a C# wrapper:
https://github.com/0xC0000054/libheif-sharp

The next step we need to start building binaries for libheif. If anybody in the community would like to help accelerate this and setup GitHub Actions to do the native builds, feel free to open a PR against our fork!

@Frooxius Frooxius added the community help welcome Issues which we are encouraging community contributions towards. label May 23, 2024
@shiftyscales shiftyscales added community help welcome Issues which we are encouraging community contributions towards. and removed community help welcome Issues which we are encouraging community contributions towards. labels Jun 10, 2024
@ProbablePrime
Copy link
Member

@BlueCyro Heard you were working on this?

Please assign yourself if you are, thank you!

@Frooxius Frooxius assigned BlueCyro and unassigned Frooxius Jul 15, 2024
@Frooxius
Copy link
Member

I've reached out to @BlueCyro via DM asking him if he'd be interested in this, since he likes the AVIF format. Assigning him.

@jae1911
Copy link
Author

jae1911 commented Oct 2, 2024

Just to log that here, I opened a PR on the libheif repository with working CI for the Windows version of the library (based on Cyro's branch that did most of the CI).

Yellow-Dog-Man/libheif#1

@BlueCyro
Copy link

BlueCyro commented Oct 3, 2024

Just to log that here, I opened a PR on the libheif repository with working CI for the Windows version of the library (based on Cyro's branch that did most of the CI).

Yellow-Dog-Man/libheif#1

Thank you very much! I will get to this after I tame my tornado of PRs a little lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community help welcome Issues which we are encouraging community contributions towards. New Feature A new addition, whose complexity hasn't been evaluated yet
Projects
Status: Todo
Status: Small cool things to do
Development

No branches or pull requests

5 participants