Delphi-WebP is a project providing Delphi bindings for Google's libWebP.dll, which loads WebP images, but the project provides no Delphi-specific image code.
How can I load a WebP image into a TImage or TBitmap?
You should develop and register TGraphic sub-class, that can load/save WebP format images, just like TPNGImage, TJPEGImage and TGIFImage classes work.
You can get examples of such classes in recent versions of VCL (JPEG and PNG), on Torry.net or with libraries like:
Just learn how that was implemented in there projects and do the same for your project of WebP support.
PS. You can also derive your class from TBitmap
rather than TGraphic
- that would be less effective but simplier to do. For example of this approach see http://galfar.vevb.net/wp/projects/jpeg2000-for-pascal/
However that would loose all the WebP-specific information and would be "quick and dirty" hack rather than proper VCL-targeted implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With