NEW 183257
[WPE] Add support for WebP encoding in HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=183257
Summary [WPE] Add support for WebP encoding in HTMLCanvasElement
Carlos Bentzen
Reported 2018-03-01 13:24:49 PST
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
Zhaolin Yu
Comment 1 2018-04-11 21:44:47 PDT
I believe this is duplicate of https://bugs.webkit.org/show_bug.cgi?id=125499.
Carlos Bentzen
Comment 2 2018-04-11 21:57:56 PDT
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
Comment 3 2018-04-11 21:59:01 PDT
> It did it typo: I did it
Note You need to log in before you can comment on or make changes to this bug.