Skip to content

Commit ec29c82

Browse files
committed
Moved BlueShift to IMagickImageCreateOperations.
1 parent 4f72fcc commit ec29c82

File tree

5 files changed

+28
-17
lines changed

5 files changed

+28
-17
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,6 @@ public partial interface IMagickImage : IMagickImageCreateOperations, IDisposabl
348348
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
349349
void BlackThreshold(Percentage threshold, Channels channels);
350350

351-
/// <summary>
352-
/// Simulate a scene at nighttime in the moonlight.
353-
/// </summary>
354-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
355-
void BlueShift();
356-
357-
/// <summary>
358-
/// Simulate a scene at nighttime in the moonlight.
359-
/// </summary>
360-
/// <param name="factor">The factor to use.</param>
361-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
362-
void BlueShift(double factor);
363-
364351
/// <summary>
365352
/// Blur image with the default blur factor (0x1).
366353
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,19 @@ public interface IMagickImageCreateOperations
210210
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
211211
void BilateralBlur(uint width, uint height, double intensitySigma, double spatialSigma);
212212

213+
/// <summary>
214+
/// Simulate a scene at nighttime in the moonlight.
215+
/// </summary>
216+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
217+
void BlueShift();
218+
219+
/// <summary>
220+
/// Simulate a scene at nighttime in the moonlight.
221+
/// </summary>
222+
/// <param name="factor">The factor to use.</param>
223+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
224+
void BlueShift(double factor);
225+
213226
/// <summary>
214227
/// Resize image to specified size.
215228
/// <para />

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public void BilateralBlur(uint width, uint height)
111111
public void BilateralBlur(uint width, uint height, double intensitySigma, double spatialSigma)
112112
=> SetResult(NativeMagickImage.BilateralBlur(width, height, intensitySigma, spatialSigma));
113113

114+
public void BlueShift()
115+
=> BlueShift(1.5);
116+
117+
public void BlueShift(double factor)
118+
=> SetResult(NativeMagickImage.BlueShift(factor));
119+
114120
public void Resize(uint width, uint height)
115121
=> Resize(new MagickGeometry(width, height));
116122

src/Magick.NET/MagickImage.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,15 +1316,21 @@ public void BlackThreshold(Percentage threshold, Channels channels)
13161316
/// </summary>
13171317
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
13181318
public void BlueShift()
1319-
=> BlueShift(1.5);
1319+
{
1320+
using var mutator = new Mutator(_nativeInstance);
1321+
mutator.BlueShift();
1322+
}
13201323

13211324
/// <summary>
13221325
/// Simulate a scene at nighttime in the moonlight.
13231326
/// </summary>
13241327
/// <param name="factor">The factor to use.</param>
13251328
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
13261329
public void BlueShift(double factor)
1327-
=> _nativeInstance.BlueShift(factor);
1330+
{
1331+
using var mutator = new Mutator(_nativeInstance);
1332+
mutator.BlueShift(factor);
1333+
}
13281334

13291335
/// <summary>
13301336
/// Blur image with the default blur factor (0x1).

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
269269
public partial void BlackThreshold(string threshold, Channels channels);
270270

271271
[Throws]
272-
[SetInstance]
273-
public partial void BlueShift(double factor);
272+
public partial IntPtr BlueShift(double factor);
274273

275274
[Throws]
276275
[SetInstance]

0 commit comments

Comments
 (0)