-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
WebP Support #121
Comments
Hi @KuroThing That will be because there is no WebP on the current roadmap. We're trying to replicate and improve on the functionality offered by System.Drawing for now. Once we have that, maybe.... maybe we might have a go at adding WebP. |
Expect more questions like this because google's lighthouse tool recomments webp or jpeg 2000/xr: https://developers.google.com/web/tools/lighthouse/audits/webp |
They can recommend all they like, the browser support for those formats is terrible! |
Any chance you could offer some comments on what's stopping this from moving forward, besides finding time to generously donate of course...perhaps someone from the community could have a go at adding support? Are there license problems? Thanks :) |
😆 That's the one. I cannot imagine it's gonna be any easier than jpeg to do which has been brutal. |
It such a strange recommendation, firefox does support none of the formats. @ChrisBellew Maybe jpeg 2000/xr is somewhat like the current jpeg support 😃 |
Firefox already supports webp. I'm going to throw a discrete party once that happens. But one thing that's going for webp is that we'd finally have 16 million color support for animated images - the archaic 256 color palette sported by gifs is really a disgrace in 2018. And despite the technical reasons, webm is an excellent format, simply because it's not covered by a plethora of bullshit patents, like mp*. It's sad ogg and webm didn't establish themselfs because dickheads like Microsoft and Apple used those patents to keep out open-source. Their move/act-of-desperation to Linux/Unix today just goes a long way towards saying that their strategy failed epically, at least on the server. Just look at all the hassle you have to go through if you want to write/release an application that supports mp3/mp4. Sadly, that means we will only ever have windows/OsX support for webp by the time there is Office/AppleWorks for Linux. But as Chromebooks outsell both iPad and traditional laptop sales by volume, rest assured - that day will come - eventually. |
@JimBobSquarePants That is precisely WHY many people use a library like this. Because they need to automate the creation of JPG / WEBP / PNG files based on inconsistent browser support. I need transparency, and I've been astonished as to how good WEBP is at keeping the filesize low. This works for all my Chrome desktop and mobile users. Then I need to create quantified PNG for Safari / IE separately. You guys are talking as if lack of support means you can't use it at all, but with a PICTURE element you just throw them both in and you're done. Again, this is the whole reason I'm even looking at this because I need to auto-generate both and be able to change parameters easy to get best quality to filesize possible. |
In your opinion. Plenty of other applications for this library actually. Web dev is a small fish in a big pond. If you need transparency have you investigated palletized png's? You shouldn't be using png for photo style images anyway, it's the wrong format. I don't need WebP just now and it's both incredibly complicated and way down my priority list so if you want it, submit a PR and get things moving.
No it doesn't. It has a partially complete leaky decoder. |
@JimBobSquarePants 'Many' is an ambiguous term I realize! I mentioned it mainly because it seemed ironic you seemed to be 'writing off' WebP for lack of browser support when the <picture> tag exists and your library makes it super easy to create images in different formats ;-) I am using palletized PNGs with alpha. Fortunately the images I need alpha for (3d renders) are very well suited to this (and I'm fine tuning them based on number of colors). In my tests I'm been quite amazed how well WebP is working and I have a very high percentage of Chrome / Android users so I was looking for a way to support all of them. I'm very glad to see libraries like yours existing and being actively worked on, but also somewhat disappointed in Microsoft that they don't have anything to offer themselves. I started using NodeServices to link to Javascript libraries and while I've got it up and running it's caused more than a few headaches this week piecing everything together. Thanks for your reply. Hope to be able to use your library soon for some other parts of the site :) |
@simeyla: SkiaSharp does support WebP, so just use it for that. As long as you deploy the application in an environment you control, the native library for Skia is not a problem. Example here. and return the image as byte-array/stream/streamresult. |
As I see Firefox will completly support webP in two months. Latest MS Edge support webp also. So only Safari (as always…) will lack support of webp. So please warm up again this thread, and add webp support into ImageSharp. If I can help in anything about webp support (except the concrete development), please contact with me! |
@martonx I'm afraid concrete development would be exactly the help we would require just now. Supporting the format will definitely be a focus post V1 but we cannot apply any effort towards it just now as we simply don't have the people and time. |
Thank you very much! And again, if I can help to test / anything except concrete development, please contact with me. |
I am interestet in coding this. Note for anybody interested:
JCodec also has an encoder and decoder: And there is an encoder & decoder written in go here: Simple decoder in go: |
Thanks @ststeiger 👍 If you get around to making a start before we do please let us know and we'll provide any assistance you require. |
Do you have any news for this ticket? |
@martonx No movement I'm afraid. |
Watching. |
I am working on support for webp. So far decoding of lossless images is almost done. I will continue with decoding lossy after that. Its still alot of work to do, though. We have a gitter subchannel |
@brianpopow any updates? Really looking forward this |
@lofcz so far lossless decoding works fine now. Im in the middle of implementing decoding lossy images. Im making progress every day, but its hard to estimate when it will be done. I guess i have 50% done for decoding lossy images so far. After that there is still the encoding part which i need to tackle. This will also take some time. |
@molinch We're actually making fantastic progress with the managed implementation. @brianpopow has gotten a bit of help from @stevetemple and am sure would appreciate any more. Bindings, on the surface look like a reasonable solution but don't allow us the flexibility we require to work with multiple pixel formats in a performant manner plus they add a huge level of complexity to deployment. |
I was planning on finishing up the bits I've started tonight and that should get us pretty close to having a working lossless encoder that matches the reference implementation in size of file produced. It'll need a bunch of refactoring and tests. Lossless is a bit further off by the looks of it, but good progress is being made. |
Hi folks 👋 In the .NET Core application I am working on. I have a requirement where an uploaded jpeg is to be resized, then saved as a Can we have an update on the status of webp in ImageSharp, please? Browser support is really picking up. Safari will be supporting webp soon. Firefox and Chrome/Edge already do. Also, many thanks for your efforts with this library. Your hard work is super appreciated ❤ |
@JwanKhalaf There's an open (work in progress) PR. #1271 You can see the status there. Code contributions welcome. |
Yep, we're very close! We need to do a final performance and API sanity check though. I've already identified performance issues with Huffman decoding/encoding but we need to document them via profiling to allow work to be done there. If anyone reading this thread want to profile encoding and encoding and add the info here that would be great. Better yet, if someone want to do some performance work in that area we can finally get it over the line! |
I appreciate you continuing this effort. The lib is working great for my small time dev projects and its all c#! Just wanted to let you know |
hey guys, just wanted to ask is this done? |
The code would be merged and the issue closed if that was the case. We’re pretty close now. I plan on a thorough review this week. |
FYI, I've started implementing animation decode support. Note that I went into this more out of curiosity and for self education than to contribute changes and simply ended up getting much farther along with it that I had intended or expected. As such, I went at it somewhat backwards, so unfortunately there are no units tests yet and, more pertinently, no PR yet. If I find time to flesh it out and tidy it up, I'll advance it, but if not, feel free to carry on with what I've started. Or, heck, feel free to ignore it too. I won't mind. :-) For reference: What's done:
What's not done:
|
@bytehydrant: Thanks for sharing, I will definitely take a look when I will start working on the animation feature. |
Hi all, is there any news when could be merged this new feature into main branch? |
I’m afraid it’s simply a matter of resources and priority. I’m focused right now on getting the Fonts and Drawing libraries up to a Release Candidate standard so cannot dedicate the time to focus on reviewing this PR. If someone else can step up and review (and provide PRs for fixes for potential issues) then that would be incredibly helpful. |
watch |
OK Peeps, Initial WebP support has been merged into our master branch and is available in our MyGet feed. Now we need you to step up and help us out to make it go fast! #1786 |
Amazing! Thank you very much to all that contributed towards WebP support ♥ Is there documentation available? I was searching through the documentation site (top right search box) for I wanted to know how I can convert a Thanks so much again. |
Thanks! WebP support isn't fully released yet and is only available via our development build on MyGet so we haven't published docs yet. Saving as WebP will work in the same manner as all saving in other formats, we have all the equivalent methods in place. |
awesome guys!! how can I get informed when it's released? |
@utillity webp is supported with the release of |
There appears to be no clear statement, regarding if WebP Encoding / Decoding will be added at any point in time. The only references to "WebP" i could find, was #11 (comment), which i don't know if it holds any value.
WebP support isn't listed in anywhere meaningful like #10 (Codecs) or an unchecked item in Features like Tiff support is.
The text was updated successfully, but these errors were encountered: