public CodecsWebpImageInfo Webp { get; }
@property (nonatomic, strong, readonly) LTCodecsWebpImageInfo *Webp;
public CodecsWebpImageInfo getWebp()
public:
property CodecsWebpImageInfo^ Webp {
CodecsWebpImageInfo^ get();
}
Webp # get (CodecsImageInfo)
A CodecsWebpImageInfo object that contains extra information about the image if the file format is WebP.
using Leadtools;
using Leadtools.Codecs;
public void TestWebpInfoExample()
{
using (RasterCodecs codecs = new RasterCodecs())
{
string srcFile = Path.Combine(LEAD_VARS.ImagesDir, "test_stamp240x200-q120.webp");
using (CodecsImageInfo info = codecs.GetInformation(srcFile, true))
{
Debug.WriteLine($"File format: {info.Format}, Size: {info.Width} x {info.Height} x {info.BitsPerPixel}");
Debug.WriteLine($"HasAlpha: {info.HasAlpha}");
if (info.Format == RasterImageFormat.WebpAni)
{
// CodecsWebpImageInfo reference
Debug.WriteLine($"Webp animation width: {info.Webp.AnimationWidth}");
Debug.WriteLine($"Webp animation width: {info.Webp.AnimationHeight}");
if (info.Webp.HasAnimationBackground)
Debug.WriteLine($"File has animation background color: {info.Webp.AnimationBackground.ToString()}");
else
Debug.WriteLine($"File does not have background color");
if (info.Webp.HasAnimationLoop)
Debug.WriteLine($"File has animation loop count: {info.Webp.AnimationLoop}");
else
Debug.WriteLine($"File does not have animation loop");
}
}
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document