C language > Graphics programming
GDI+ WebP support
John Z:
Over on the MASM site there was mention of GDI+ supporting WebP format 'soon'. This was back in Nov 2022.
http://masm32.com/board/index.php?topic=10437.msg114912#msg114912
Does it work for windows 10/11 now? Guess I could just try but maybe someone knows already if
GDILoadPictureFile and GdipLoadImageFromFile work for WebP and maybe HEIF too.
There are 'work arounds' here https://forum.pellesc.de/index.php?topic=10593.0 but direct GDI+ would make it simple.
Thanks,
John Z
MrBcx:
I discovered some apps (Most browsers, Media Player Classic, Paint 3D, others ) will display locally stored webp images.
I also discovered this repository:
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html
I downloaded the latest 64-bit version for Windows and unzipped.
Inside the /bin/ folder are several compiled apps ... notably, dwebp
I converted a local webp image to a png on my first go:
C:\Temp>dwebp tree.webp -o tree.png
So, if shelling out to dwebp doesn't send you screaming towards the door,
then you now have a simple way to give yourself access to webp images.
John Z:
Thanks MrBcx,
I can easily use Ifranview for that both interactive and command line.
vCardz_i supports a few image formats so I was thinking of updating it
to include WebP for photo and logo data. If GDI+ supports it then it is
just a matter of allowing the extension. Probably I just need to try it.
John Z
Vortex:
Hi John,
I tested Timo's example project on Win10PE, it works fine.
John Z:
--- Quote from: Vortex on February 26, 2023, 09:20:28 PM ---Hi John,
I tested Timo's example project on Win10PE, it works fine.
--- End quote ---
Thanks! I'm going to code it - that's all :) :)
I'll post back success or fail
John Z
Update: Added WebP file handling but it fails to display. GdipLoadImageFromFile does not load a WebP file. Windows 11 2H22, OS build 22621.1265
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR* filename, GpImage **image);
I'll wait ....
Navigation
[0] Message Index
[#] Next page
Go to full version