Skip to content

Commit 7e8f021

Browse files
committed
Moved Emboss to IMagickImageCreateOperations.
1 parent 2a85f1b commit 7e8f021

File tree

5 files changed

+33
-19
lines changed

5 files changed

+33
-19
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -905,20 +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-
/// Emboss image (highlight edges with 3D effect) with default value (0x1).
910-
/// </summary>
911-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
912-
void Emboss();
913-
914-
/// <summary>
915-
/// Emboss image (highlight edges with 3D effect).
916-
/// </summary>
917-
/// <param name="radius">The radius of the Gaussian, in pixels, not counting the center pixel.</param>
918-
/// <param name="sigma">The standard deviation of the Laplacian, in pixels.</param>
919-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
920-
void Emboss(double radius, double sigma);
921-
922908
/// <summary>
923909
/// Converts pixels to cipher-pixels.
924910
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,20 @@ public interface IMagickImageCreateOperations
432432
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
433433
void Edge(double radius);
434434

435+
/// <summary>
436+
/// Emboss image (highlight edges with 3D effect) with default value (0x1).
437+
/// </summary>
438+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
439+
void Emboss();
440+
441+
/// <summary>
442+
/// Emboss image (highlight edges with 3D effect).
443+
/// </summary>
444+
/// <param name="radius">The radius of the Gaussian, in pixels, not counting the center pixel.</param>
445+
/// <param name="sigma">The standard deviation of the Laplacian, in pixels.</param>
446+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
447+
void Emboss(double radius, double sigma);
448+
435449
/// <summary>
436450
/// Resize image to specified size.
437451
/// <para />

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ public void Distort(IDistortSettings settings, params double[] arguments)
249249
public void Edge(double radius)
250250
=> SetResult(NativeMagickImage.Edge(radius));
251251

252+
public void Emboss()
253+
=> Emboss(0.0, 1.0);
254+
255+
public void Emboss(double radius, double sigma)
256+
=> SetResult(NativeMagickImage.Emboss(radius, sigma));
257+
252258
public void Resize(uint width, uint height)
253259
=> Resize(new MagickGeometry(width, height));
254260

src/Magick.NET/MagickImage.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,14 +2648,20 @@ public void Draw(IEnumerable<IDrawable> drawables)
26482648
/// <param name="radius">The radius of the pixel neighborhood.</param>
26492649
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26502650
public void Edge(double radius)
2651-
=> _nativeInstance.Edge(radius);
2651+
{
2652+
using var mutator = new Mutator(_nativeInstance);
2653+
mutator.Edge(radius);
2654+
}
26522655

26532656
/// <summary>
26542657
/// Emboss image (highlight edges with 3D effect) with default value (0x1).
26552658
/// </summary>
26562659
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26572660
public void Emboss()
2658-
=> Emboss(0.0, 1.0);
2661+
{
2662+
using var mutator = new Mutator(_nativeInstance);
2663+
mutator.Emboss();
2664+
}
26592665

26602666
/// <summary>
26612667
/// Emboss image (highlight edges with 3D effect).
@@ -2664,7 +2670,10 @@ public void Emboss()
26642670
/// <param name="sigma">The standard deviation of the Laplacian, in pixels.</param>
26652671
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26662672
public void Emboss(double radius, double sigma)
2667-
=> _nativeInstance.Emboss(radius, sigma);
2673+
{
2674+
using var mutator = new Mutator(_nativeInstance);
2675+
mutator.Emboss(radius, sigma);
2676+
}
26682677

26692678
/// <summary>
26702679
/// Converts pixels to cipher-pixels.

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
383383
public partial IntPtr Edge(double radius);
384384

385385
[Throws]
386-
[SetInstance]
387-
public partial void Emboss(double radius, double sigma);
386+
public partial IntPtr Emboss(double radius, double sigma);
388387

389388
[Throws]
390389
[SetInstance]

0 commit comments

Comments
 (0)