Skip to content

Commit 74c1722

Browse files
committed
Moved Implode to IMagickImageCreateOperations.
1 parent 648c1e0 commit 74c1722

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,14 +1135,6 @@ public partial interface IMagickImage : IMagickImageCreateOperations, IDisposabl
11351135
/// <returns>A value indicating whether a profile with the specified name already exists on the image.</returns>
11361136
bool HasProfile(string name);
11371137

1138-
/// <summary>
1139-
/// Implode image (special effect).
1140-
/// </summary>
1141-
/// <param name="amount">The extent of the implosion.</param>
1142-
/// <param name="method">Pixel interpolate method.</param>
1143-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
1144-
void Implode(double amount, PixelInterpolateMethod method);
1145-
11461138
/// <summary>
11471139
/// Import pixels from the specified byte array.
11481140
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,14 @@ public interface IMagickImageCreateOperations
584584
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
585585
void HoughLine(uint width, uint height, uint threshold);
586586

587+
/// <summary>
588+
/// Implode image (special effect).
589+
/// </summary>
590+
/// <param name="amount">The extent of the implosion.</param>
591+
/// <param name="method">Pixel interpolate method.</param>
592+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
593+
void Implode(double amount, PixelInterpolateMethod method);
594+
587595
/// <summary>
588596
/// Resize image to specified size using the specified interpolation method.
589597
/// </summary>

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ public void HoughLine()
335335
public void HoughLine(uint width, uint height, uint threshold)
336336
=> SetResult(NativeMagickImage.HoughLine(width, height, threshold));
337337

338+
public void Implode(double amount, PixelInterpolateMethod method)
339+
=> SetResult(NativeMagickImage.Implode(amount, method));
340+
338341
public void InterpolativeResize(uint width, uint height, PixelInterpolateMethod method)
339342
=> InterpolativeResize(new MagickGeometry(width, height), method);
340343

src/Magick.NET/MagickImage.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3412,7 +3412,10 @@ public void HoughLine(uint width, uint height, uint threshold)
34123412
/// <param name="method">Pixel interpolate method.</param>
34133413
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
34143414
public void Implode(double amount, PixelInterpolateMethod method)
3415-
=> _nativeInstance.Implode(amount, method);
3415+
{
3416+
using var mutator = new Mutator(_nativeInstance);
3417+
mutator.Implode(amount, method);
3418+
}
34163419

34173420
/// <summary>
34183421
/// Import pixels from the specified byte array into the current image.

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
478478
public partial IntPtr HoughLine(nuint width, nuint height, nuint threshold);
479479

480480
[Throws]
481-
[SetInstance]
482-
public partial void Implode(double amount, PixelInterpolateMethod method);
481+
public partial IntPtr Implode(double amount, PixelInterpolateMethod method);
483482

484483
[Throws]
485484
public partial void ImportPixels(nint x, nint y, nuint width, nuint height, string map, StorageType storageType, void* data, nuint offsetInBytes);

0 commit comments

Comments
 (0)