Bug 183257
Summary: | [WPE] Add support for WebP encoding in HTMLCanvasElement | ||
---|---|---|---|
Product: | WebKit | Reporter: | Carlos Bentzen <cadubentzen> |
Component: | WPE WebKit | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | bugs-noreply, franklinyu, me |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Carlos Bentzen
Currently LayoutTests/fast/canvas/canvas-toDataURL-webp.html fails.
I think the path to implement it is:
- Add WebPImageEncoder.{h,cpp} to Source/WebCore/platform/image-encoders and implement compressRGBABigEndianToWebP() using libwebp
- Extend encodeImage() in Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp to use the encoder implemented.
- Add WebP encoding to the MIMETypeRegistry
- Find encode.h as well in FindWebP.cmake
Is that the right path? I would happily implement this if so.
Also, is this feature relevant? I couldn't find the requirement on W3C and I think right now only Chrome implements it.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Zhaolin Yu
I believe this is duplicate of https://bugs.webkit.org/show_bug.cgi?id=125499.
Carlos Bentzen
Yes. It is the same test failing. However, I mentioned here specifically the WPE port.
It did it because the image encoding code is different from other ports. For example, for GTK it is implemented in Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp, relying on GdkPixBuf.
As this code isn't shared between ports I opened this one for a possible implementation only for WPE.
For GTK it could be added a fallback to reuse the implementation intended here using libwebp in the special case of WebP images.
Carlos Bentzen
> It did it
typo: I did it