Skip to content

Commit fc39901

Browse files
committed
Moved Magnify to IMagickImageCreateOperations.
1 parent 9cb8d98 commit fc39901

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
@@ -1309,12 +1309,6 @@ public partial interface IMagickImage : IMagickImageCreateOperations, IDisposabl
13091309
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
13101310
void Lower(uint size);
13111311

1312-
/// <summary>
1313-
/// Magnify image by integral size.
1314-
/// </summary>
1315-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
1316-
void Magnify();
1317-
13181312
/// <summary>
13191313
/// Delineate arbitrarily shaped clusters in the image.
13201314
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,12 @@ public interface IMagickImageCreateOperations
690690
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
691691
void LiquidRescale(Percentage percentageWidth, Percentage percentageHeight, double deltaX, double rigidity);
692692

693+
/// <summary>
694+
/// Magnify image by integral size.
695+
/// </summary>
696+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
697+
void Magnify();
698+
693699
/// <summary>
694700
/// Resize image to specified size.
695701
/// <para />

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ public void LiquidRescale(Percentage percentage)
383383
public void LiquidRescale(Percentage percentageWidth, Percentage percentageHeight)
384384
=> LiquidRescale(new MagickGeometry(percentageWidth, percentageHeight));
385385

386+
public void Magnify()
387+
=> SetResult(NativeMagickImage.Magnify());
388+
386389
public void LiquidRescale(Percentage percentageWidth, Percentage percentageHeight, double deltaX, double rigidity)
387390
{
388391
var geometry = new MagickGeometry(percentageWidth, percentageHeight);

src/Magick.NET/MagickImage.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4057,7 +4057,10 @@ public void Lower(uint size)
40574057
/// </summary>
40584058
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
40594059
public void Magnify()
4060-
=> _nativeInstance.Magnify();
4060+
{
4061+
using var mutator = new Mutator(_nativeInstance);
4062+
mutator.Magnify();
4063+
}
40614064

40624065
/// <summary>
40634066
/// Delineate arbitrarily shaped clusters in the image.

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
517517
public partial void LocalContrast(double radius, double strength, Channels channels);
518518

519519
[Throws]
520-
[SetInstance]
521-
public partial void Magnify();
520+
public partial IntPtr Magnify();
522521

523522
[Throws]
524523
[SetInstance]

0 commit comments

Comments
 (0)