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

fix(eog): add completion for AVIF and WEBP files #1005

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

Rogach
Copy link
Contributor

@Rogach Rogach commented Jun 13, 2023

I'm not sure what to write here - it is what it says on the tin, I've just added two more file extensions.

Copy link
Collaborator

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to find a page that lists the supported file formats, but it seems to be hard to list the supported file formats. The page [1] doesn't seem to list many file formats including the suggested .avif and .webp. Meanwhile, the Wikipedia article [2] seems to list those file formats, but it doesn't seem to be based on official information.

The source repository [3] doesn't seem to contain the file formats either (based on the code search). Instead, it seems to call an external function gdk_pixbuf_get_formats to get the list of formats [4].

The function gdk_pixbuf_get_formats seems to be from the GdkPixbuf library. The GdkPixbuf library seems to recommend creating an external loader module for each file format, so it is hard to pre-determine which formats are supported by the system. At least, the file formats avif and webp seem to be supported by external modules.


Edit: There seem to be several ways to dynamically get the file formats supported in the present system [9,10].

@scop
Copy link
Owner

scop commented Jun 14, 2023

I'm not sure what to write here - it is what it says on the tin, I've just added two more file extensions.

FWIW, I usually just leave it empty or say "SSIA.".

There seem to be several ways to dynamically get the file formats supported in the present system

That would be interesting. However at least on Ubuntu 20, gdk-pixbuf-query-loaders is not installed in $PATH (it's buried in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0), and doesn't seem that the output format is documented (not that that would prevent us from happily scraping stuff everywhere though ;)). The Python recipe looks cleaner, but requires modules that are not necessarily present (e.g. gi), and I'm not sure if even Python can be assumed present. But I guess we could make something work from these, if someone's interested.

@scop scop merged commit f1c04b8 into scop:master Jun 14, 2023
@scop
Copy link
Owner

scop commented Jun 14, 2023

Resolved conflicts, sorted the regex elements, fixed up commit message, merged, thanks 👍

@github-actions github-actions bot mentioned this pull request Jun 14, 2023
@Rogach Rogach deleted the pr/eog-add-avif-and-webp branch June 18, 2023 23:42
@github-actions github-actions bot mentioned this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants