/// <summary>
/// Performs compression on the specified 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.
/// </summary>
/// <param name="fileName">The file name of the image to compress.</param>
/// <returns>True when the image could be compressed otherwise false.</returns>
public bool Compress(string fileName)
{
var filePath = FileHelper.CheckForBaseDirectory(fileName);
Throw.IfNullOrEmpty(nameof(fileName), filePath);
return(DoCompress(new FileInfo(filePath)));
}