public void MagickWebpLossless() { using var memoryStream = new MemoryStream(); var defines = new WebPWriteDefines { Lossless = true, Method = 4, // 100 means off. NearLossless = 100 }; this.webpMagick.Quality = 75; this.webpMagick.Write(memoryStream, defines); }
public void MagickWebpLossy() { using var memoryStream = new MemoryStream(); var defines = new WebPWriteDefines { Lossless = false, Method = 4, AlphaCompression = WebPAlphaCompression.None, FilterStrength = 60, SnsStrength = 50, Pass = 1, // 100 means off. NearLossless = 100 }; this.webpMagick.Quality = 75; this.webpMagick.Write(memoryStream, defines); }