Skip to content

Commit 2350b3a

Browse files
committed
Moved Enhance to IMagickImageCreateOperations.
1 parent cd93a5c commit 2350b3a

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,6 @@ public partial interface IMagickImage : IMagickImageCreateOperations, IDisposabl
905905
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
906906
void Draw(IEnumerable<IDrawable> drawables);
907907

908-
/// <summary>
909-
/// Applies a digital filter that improves the quality of a noisy image.
910-
/// </summary>
911-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
912-
void Enhance();
913-
914908
/// <summary>
915909
/// Applies a histogram equalization to the image.
916910
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,12 @@ public interface IMagickImageCreateOperations
453453
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
454454
void Encipher(string passphrase);
455455

456+
/// <summary>
457+
/// Applies a digital filter that improves the quality of a noisy image.
458+
/// </summary>
459+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
460+
void Enhance();
461+
456462
/// <summary>
457463
/// Resize image to specified size.
458464
/// <para />

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ public void Encipher(string passphrase)
262262
SetResult(NativeMagickImage.Encipher(passphrase));
263263
}
264264

265+
public void Enhance()
266+
=> SetResult(NativeMagickImage.Enhance());
267+
265268
public void Resize(uint width, uint height)
266269
=> Resize(new MagickGeometry(width, height));
267270

src/Magick.NET/MagickImage.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,10 @@ public void Encipher(string passphrase)
26912691
/// </summary>
26922692
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26932693
public void Enhance()
2694-
=> _nativeInstance.Enhance();
2694+
{
2695+
using var mutator = new Mutator(_nativeInstance);
2696+
mutator.Enhance();
2697+
}
26952698

26962699
/// <summary>
26972700
/// Applies a histogram equalization to the image.

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
389389
public partial IntPtr Encipher(string passphrase);
390390

391391
[Throws]
392-
[SetInstance]
393-
public partial void Enhance();
392+
public partial IntPtr Enhance();
394393

395394
[Throws]
396395
public partial void Equalize(Channels channels);

0 commit comments

Comments
 (0)