API Reference
OfficeWebpCodec
Dependency-free lossless WebP encoder for RGBA images.
Inheritance
- Object
- OfficeWebpCodec
Remarks
The encoder deterministically selects between a literal VP8L stream and a bounded prediction, subtract-green, and LZ77 stream. Decoding supports bounded VP8 keyframes with optional raw or lossless-compressed alpha and lossless VP8L; animation remains a caller-codec responsibility.
Methods
public static Byte[] Encode(OfficeRasterImage image) #Byte[]Encodes an RGBA image as a lossless VP8L WebP image.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
public static Byte[] Encode(OfficeRasterImage image, Double dpiX, Double dpiY) #Byte[]Encodes an RGBA image as a lossless VP8L WebP image with Exif resolution metadata.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- dpiX System.Double
- dpiY System.Double
public static Void EncodeTo(OfficeRasterImage image, Stream destination) #VoidEncodes an RGBA image directly to a caller-owned writable stream.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- destination System.IO.Stream
public static Void EncodeTo(OfficeRasterImage image, Stream destination, Double dpiX, Double dpiY) #VoidEncodes an RGBA image with Exif resolution metadata directly to a writable stream.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- destination System.IO.Stream
- dpiX System.Double
- dpiY System.Double
public static Void EncodeTo(OfficeRasterImage image, IBufferWriter<Byte> destination) #VoidEncodes an RGBA image directly to a caller-owned buffer writer.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- destination System.Buffers.IBufferWriter{System.Byte}
public static Void EncodeTo(OfficeRasterImage image, IBufferWriter<Byte> destination, Double dpiX, Double dpiY) #VoidEncodes an RGBA image with Exif resolution metadata directly to a buffer writer.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- destination System.Buffers.IBufferWriter{System.Byte}
- dpiX System.Double
- dpiY System.Double
public static Boolean IsWebp(Byte[] encodedBytes) #BooleanReturns whether the payload is a RIFF WebP container.
Parameters
- encodedBytes System.Byte[]
public static Boolean TryDecode(Byte[] encodedBytes, out OfficeRasterImage image) #BooleanAttempts to decode bounded ordinary lossless VP8L, including prediction, color, subtract-green, palette, LZ77, color-cache, and Huffman features. VP8 keyframes with raw or lossless-compressed alpha are also decoded; animation remains an optional caller-codec responsibility.
Parameters
- encodedBytes System.Byte[]
- image OfficeIMO.Drawing.OfficeRasterImage@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object