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

Add a gdk-pixbuf module #182

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Conversation

linkmauve
Copy link
Contributor

gdk-pixbuf is a widely-used image loader on Linux, this module gives most Linux software instant support for AVIF.

gdk-pixbuf upstream rejects any new format, so in order to make Linux distributions aware that this AVIF loader exists it makes sense to ship it alongside libavif.

For now it only supports loading still images (no sequences) and doesn’t support saving, but this can come in a later pull request.

@linkmauve linkmauve force-pushed the gdk-pixbuf branch 2 times, most recently from c3f56ef to d5ea7ed Compare June 21, 2020 09:05
@joedrago
Copy link
Collaborator

Assuming you can survive the Travis (and other) CI checks, I'm generally okay with this kind of thing. That said, this is the kind of thing that should be in a contrib/ directory, as I don't plan on actively maintaining it, and I'd want a new section added to LICENSE citing the contrib/gdk-pixbuf/* with your license info in it.

I'll probably want all contrib build options to be in their own section in CMakeLists.txt, but I can clean that up afterwards.

@joedrago
Copy link
Collaborator

I'll make a stub contrib/ directory now in the master branch, so you can move this in there (if you want to continue to tweak / submit this PR).

@linkmauve
Copy link
Contributor Author

I can commit to becoming the maintainer of this loader, if that’s what you’re worried about. :)

As for the license, I went with the same one as libavif, as I don’t have much of a preference. With gdk-pixbuf itself being under LGPL 2.1, that shouldn’t be an issue.

I’ll rearrange the cmake stuff and move it there, fix the const issues from clang, and then this MVP should be good to go, thanks!

@linkmauve linkmauve force-pushed the gdk-pixbuf branch 2 times, most recently from 16494e9 to 0139a2a Compare June 22, 2020 20:06
@joedrago
Copy link
Collaborator

I recognize that you might simply have it on right now to verify the build with CI, but AVIF_BUILD_GDK_PIXBUF certainly needs to be OFF by default in the final PR.

@linkmauve
Copy link
Contributor Author

linkmauve commented Jun 22, 2020

There, CI passed!

Edit: I’ve pushed a new version where it isn’t built by default anymore, thanks!

gdk-pixbuf[1] is a widely-used image loader on Linux, this module gives
most Linux software instant support for AVIF.

gdk-pixbuf upstream rejects any new format[2], so in order to make Linux
distributions aware that this AVIF loader exists it makes sense to ship
it alongside libavif.

For now it only supports loading still images (no sequences) and doesn’t
support saving, but this can come in a later pull request.

[1] https://developer.gnome.org/gdk-pixbuf/stable/
[2] https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/76#note_845043
@joedrago joedrago merged commit 72253f5 into AOMediaCodec:master Jun 22, 2020
@joedrago
Copy link
Collaborator

I've merged this, but I'm going to move the CMake block into the contrib subdir. Let me know if it breaks for you after I've done this, please.

@linkmauve linkmauve deleted the gdk-pixbuf branch June 22, 2020 21:21
@joedrago
Copy link
Collaborator

joedrago commented Jun 22, 2020

Alright, I've moved the block here (with one tiny change to the sources line):

98d9f4b

I've also put your own license header at the top, as you're the author of that block. This layout is much easier to delineate licensing and scales better if others offer future contributions.

@linkmauve
Copy link
Contributor Author

I confirm it still works when adding -DAVIF_BUILD_GDK_PIXBUF=ON on the cmake invocation!

ncfavier pushed a commit to ncfavier/nixpkgs that referenced this pull request Jul 25, 2023
AOMediaCodec/libavif#182
AOMediaCodec/libavif#977

Mostly mirrors webp-pixbuf-loader.

Also use prefixed names for `loaders.cache` so that users can install
multiple loaders in a profile without collisions, and move
`bin/webp-thumbnailer` to `libexec/gdk-pixbuf-thumbnailer-webp` (and
similarly for avif).
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.

2 participants