The WebP Format is a file format created by Google to provide superior lossless and lossy compression for images on the web. The file format has two forms:
The file format is supported by all the major web browsers and the Windows operating system starting with version 10. For information on WebP support in other Operating Systems, refer to the following:
The animation format contains the auto-loop feature in GIF. The animation is 24-bit, which means the quality of a WEBP animation will be higher than a GIF animation.
The format uses 24 or 32-bits/pixel. The 32-bit file uses alpha channel transparency, where pixels can range from fully transparent to fully opaque.
Note
When saving 32-bit files, the alpha channel might be discarded if the encoder detects that all the alpha values are 0xFF. In this case, the output file becomes 24-bit rather than 32-bit.
The lossy single page format is intended to replace JPEG. The lossless single page is intended to replace PNG and GIF. The animated files are intended to replace animated GIFs.
The WEBP format uses VP8 compression (lossy or lossless). WEBP lossless images are 26% smaller than PNG and WEBP lossy images are 25-34% smaller than JPEG files of similar size according to Google, the format's creator.
The WEBP files use the extension .webp
.
LEADTOOLS supports single-page files and animations. Each of these can be saved with lossy or lossless compression.
Alpha channel/transparency information. The 32-bit file contains a transparency channel. For these files, alpha of 0 represents transparent pixels, 255 represents opaque pixels, and alpha of 1-254 values represent translucent pixels.
Still frame and animation support. Animated files use the alpha channel transparency to reduce the file size. The animated files can be restarted automatically using a loop setting to create the infinite animations that are so popular on the web.
Exif metadata, which can contain the comments and tags supported by TIFF and EXIF. WEBP files can contain an embedded TIF file that contains only tags and comments information (no image data). Consequently, any metadata that can be saved in TIFF/Exif files can be saved in WEBP as well.
ICC Profiles. Use LICCProfile::Load and LICCProfile::Save to read and write ICC profiles from/to WEBP files.
Lossy/Lossless compression. Save lossy files by setting qFactor
between 1 (highest quality, lowest compression) to 255 (lowest quality, highest compression). Use a qFactor
of 0 to save lossless files.
Thumbnails (Stamps). Use LFile::ReadStamp to read a thumbnail. You can save a stamp by setting the ESO_SAVEWITHSTAMP
flag in the SAVEFILEOPTION.Flags structure member prior and setting the stamp width, height and bits per pixel to calling the save function. Or use LFile::WriteStamp to write a stamp bitmap to an existing file.
File constants associated with this file format are:
Constant | Read Support | Write Support | Description |
---|---|---|---|
FILE_WEBP | 24, 32 | 24, 32 BPP | [404] Single-page WEBP file. |
FILE_WEBP_ANI | 24, 32 | 24, 32 BPP | [405] Animated WEBP file. |
Win32, x64, UWP, Linux, Android, iOS.
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