I haven’t used it myself, but it appears Skia4Delphi adds support for WEBP. It looks like it is mostly fmx, but I think the file formats support VCL as well.
Yes I managed to get Skia working to load WEBP images into a VCL TImage and I expect it works for FireMonkey. The Skia installer did not work for XE8 on an old version of Windows 10, but is supposed to work for more up to date versions
Here are some notes that I provided to the Perth branch about this
=====================================
WEBP image support can be added to Delphi using part of the (FREE) Skia4Delphi add-on
I did not test Firemonkey.
It might require some minor changes.
The GitHub page mentioned FMX so it should be ok
Instructions
Carefully follow the instructions on the GitHub page
which should be this :
- Download and install Skia either from GitHub (see above)
or from https://skia4delphi.org/ >>> click DOWNLOAD LATEST VERSION
- Start Delphi and open a Delphi project
then Right click on the project (Project1.exe) and click **"Enable Skia"** from the popup menu
- include the DLL (sk4d.sqll) in the same folder as your *.EXE file.
Also copy the DLL to the DEBUG and RELEASE folder for your project
so it can be accessed when running your program from then Delphi.
There might be a way to specify the folder that the DLL is in,
but I have not looked in to that
- Include these two units in your USES clause.
* USES Skia, Skia.Vcl; // required for WEBP image support
- You now have native WEBP support in Delphi (only for the project that you did "Enable Skia" in (see above).
Delphi will know that an image is a WEBP based on the file extension (*.webp)
- load and save WEBP image
* You can load WEBP images into a TImage from a file
begin
Image1.picture.LoadFromFile ('c:\temp\MyWebpImage.webp');
end;
* You can save WEBP images from a TImage to a file
begin
Image1.picture.SaveToFile ('c:\temp\MyWebpImage.webp');
end;