Closed dustincleveland closed 1 year ago
You can use the WebView2 control, which supports animated WebP files
I can give that a shot, but I don't expect that a WebView2 will support virtualization? I'd like to support displaying a large number of files in a staggered layout.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Animated WebP still not supported.
I just tested with WIC (IWICBitmapDecoder) and it works on my Windows 10 OS (22H2) although WebP is not in Native decoders
I uploaded a test : WinUI3_WIC_WebP for a control using a SwapChainPanel (Direct2D) and MMIO functions to read WebP attributes I tested with WebP files I found on Google or others I created from GIF/MPEG
I have the same issue and it would be great if BitmapImage
supports animated webp images, not only gif
I have the same issue and it would be great if
BitmapImage
supports animated webp images, not only gif
Actually I just found about Magick.NET and used it to convert webp to gif in my application and it worked for me.
I have the same issue and it would be great if
BitmapImage
supports animated webp images, not only gif
Did you test the "WebPControl" control ?
I have the same issue and it would be great if
BitmapImage
supports animated webp images, not only gifDid you test the "WebPControl" control ?
I just tried it but the image in WebPControl
doesn't seem to enlarge when I increase the height or width of the control. Is it possible to resize the image when the control's size changes?
I just tried it but the image in
WebPControl
doesn't seem to enlarge when I increase the height or width of the control. Is it possible to resize the image when the control's size changes?
Yes, I have voluntarily put it inside a ScrollViewer to get Scrollbars when the image is too big You can remove the ScrollViewer and for example use HorizontalAlignment="Stretch" VerticalAlignment="Stretch" for the control in XAML And I have fixed its size and centered it to avoid stretching, at lines :
//this.Width = m_nCanvasWidth;
//this.Height = m_nCanvasHeight;
and
//destRect.left = (nWidth - nFrameWidth) / 2.0f;
//destRect.top = (nHeight - nFrameHeight) / 2.0f;
//destRect.right = destRect.left + (float)nFrameWidth;
//destRect.bottom = destRect.top + (float)nFrameHeight;
then it will be stretched, but it is not great for the resolution :
@castorix I really appreciate your help and your suggested change works without any problem.
However, meanwhile, I also tried using WebView2
as you have mentioned before and I think that control is potentially more suitable for my project.
So I will try using it first and see if it works out.
Thanks for your help.
I'd like to implement a control, a codec, or anything that will let me render animated WebP files within a C# Windows App SDK application. The solution needs to be performant; on par with the animated GIF rendering natively available via the Image control.
I've been scouring all the resources I can find for some kind of guidance on this. I've come across WIC, Win2D, the Windows.Graphics.Imaging namepsace, several outdated libraries (such as the Lumia Imaging SDK), and this blog post. I don't really have experience with Windows graphics systems, so all of the new knowledge is a little overwhelming, and I'm having a hard time trying to determine which avenue would be the most modern and best starting point. I'm honestly not even sure if this is the right place to ask, but I saw an issue that was closed about adding animated WebP support to the Image control that made me think it might be.
Would someone please help point me in the right direction on this, or offer any advice to help focus my effort? Thanks!