Magick.NET-Q8-AnyCPU by Dirk Lemstra

<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="7.0.5.800" />

.NET API 11,314,688 bytes

 ImageOptimizer

public sealed class ImageOptimizer
Class that can be used to optimize an image.
public bool OptimalCompression { get; set; }

Gets or sets a value indicating whether various compression types will be used to find the smallest file. This process will take extra time because the file has to be written multiple times.

public ImageOptimizer()

public void Compress(FileInfo file)

Performs compression on the specified the file. With some formats the image will be decoded and encoded and this will result in a small quality reduction. If the new file size is not smaller the file won't be overwritten.

public void Compress(string fileName)

Performs compression on the specified the file. With some formats the image will be decoded and encoded and this will result in a small quality reduction. If the new file size is not smaller the file won't be overwritten.

public bool IsSupported(FileInfo file)

Returns true when the supplied file name is supported based on the extension of the file.

public bool IsSupported(MagickFormatInfo formatInfo)

Returns true when the supplied formation information is supported.

public bool IsSupported(string fileName)

Returns true when the supplied file name is supported based on the extension of the file.

public void LosslessCompress(FileInfo file)

Performs lossless compression on the specified the file. If the new file size is not smaller the file won't be overwritten.

public void LosslessCompress(string fileName)

Performs lossless compression on the specified file. If the new file size is not smaller the file won't be overwritten.