|
|
|
@ -55,18 +55,6 @@ namespace SixLabors.ImageSharp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Writes the image to the given stream using the currently loaded image format.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The source image.</param>
|
|
|
|
/// <param name="path">The file path to save the image to.</param>
|
|
|
|
/// <param name="encoder">The encoder to save the image with.</param>
|
|
|
|
/// <exception cref="ArgumentNullException">The path is null.</exception>
|
|
|
|
/// <exception cref="ArgumentNullException">The encoder is null.</exception>
|
|
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
|
|
public static Task SaveAsync(this Image source, string path, IImageEncoder encoder) |
|
|
|
=> SaveAsync(source, path, encoder, default); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Writes the image to the given stream using the currently loaded image format.
|
|
|
|
/// </summary>
|
|
|
|
@ -81,7 +69,7 @@ namespace SixLabors.ImageSharp |
|
|
|
this Image source, |
|
|
|
string path, |
|
|
|
IImageEncoder encoder, |
|
|
|
CancellationToken cancellationToken) |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Guard.NotNull(path, nameof(path)); |
|
|
|
Guard.NotNull(encoder, nameof(encoder)); |
|
|
|
|