private string SaveResultToFile(string sourcePath, BitmapEncoder encoder)
        {
            string destinationPath = _renamer.Rename(sourcePath);

            if (encoder.GetType() == DefaultEncoderType)
            {
                destinationPath = Path.ChangeExtension(destinationPath, DefaultEncoderExtension);
            }

            using (var destinationStream = File.Open(destinationPath, FileMode.Create))
            {
                // Save the final image
                encoder.Save(destinationStream);
            }

            return destinationPath;
        }