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 support for WebP format? #639

Open
striezel opened this issue Mar 28, 2022 · 5 comments
Open

Add support for WebP format? #639

striezel opened this issue Mar 28, 2022 · 5 comments
Labels
cat/feature New feature or functionality ext/io boost/gil/extension/io/ status/need-help Issues where help and contributions are welcome

Comments

@striezel
Copy link
Contributor

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

GIL does not support images in the WebP format. In my experience, this format is becoming increasingly more common as a replacement for JPEG and PNG image formats. So at least read support for that format would be really nice. :)

Describe the solution you'd like

There should be an I/O extension which can read WebP images (and possibly write such images, too).
Easiest way would probably be to use the existing libwebp library to do the reading and writing. Encoding/decoding of such images in one go is possible via libwebp's API.

Questions

  • Are there any intentions to add WebP support to Boost GIL?
    • If yes: Is someone already working on such a feature? What is the best way to support the existing efforts?
    • If no: What is the suggested alternative for handling WebP with Boost GIL? Would a pull requests that adds support for WebP be welcome?
@mloskot mloskot added ext/io boost/gil/extension/io/ cat/feature New feature or functionality status/need-help Issues where help and contributions are welcome labels Mar 28, 2022
@mloskot
Copy link
Member

mloskot commented Mar 28, 2022

Are there any intentions to add WebP support to Boost GIL?

Yes, I think it's a very good idea to support the format.

If yes: Is someone already working on such a feature?

I'm not aware of any ongoing developments for this.

What is the best way to support the existing efforts?

Since there are no ongoing efforts, the best way is to

  • look at how other formats are implemented, sources in include/boost/gil/extension/io
  • implement the I/O reader/writer for WebP
  • submit it via Pull Request for review
  • enjoy the fame and wealth ;-)

@ssleert
Copy link

ssleert commented May 4, 2024

any progress?

@mloskot
Copy link
Member

mloskot commented May 4, 2024

Nope, none that I'm aware of.

@striezel
Copy link
Contributor Author

striezel commented May 5, 2024

any progress?

No, not really. ;)
I still have the intention to implement it in the future, but it is currently not one of my top priorities.

If somebody really needs this urgently, then I could probably create a first iteration within the next one or two weeks. (Given that I find some spare time to dive into this.) The first iteration will probably be just able to read WebP images and have no writing capabilities, and it will probably only support reading into rgb8_image_t and rgba8_image_t images. Also remember that the WebP format allows for animated images (like animated GIFs), but all the GIL interfaces currently assume that one file means one image only. So animated WebP images would not work either.
In other words: Don't expect too much from the first implementation.

@mloskot
Copy link
Member

mloskot commented May 10, 2024

I still have the intention to implement it in the future, but it is currently not one of my top priorities.

@striezel Thanks for the interest in working on this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/feature New feature or functionality ext/io boost/gil/extension/io/ status/need-help Issues where help and contributions are welcome
Projects
None yet
Development

No branches or pull requests

3 participants