using ImageMagick; namespace Image { /// /// LosslessCompressor compresses an image using lossless compression provided by ImageMagick. /// public class LosslessCompressor : ICompressor { public static readonly LosslessCompressor Instance = new(); private readonly ImageOptimizer _imageOptimizer; public LosslessCompressor() { _imageOptimizer = new ImageOptimizer(); } /// /// /// public void Compress(string fileName) { _imageOptimizer.LosslessCompress(fileName); } } }