Skip to content

Commit

Permalink
Changes due to update of Magick.Native.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Nov 27, 2023
1 parent c80c8e5 commit 86b4d94
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions src/Magick.NET/MagickImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3570,7 +3570,7 @@ public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointP
/// <param name="gamma">The gamma correction to apply to the image. (Useful range of 0 to 10).</param>
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
public void InverseLevel(QuantumType blackPoint, QuantumType whitePoint, double gamma)
=> _nativeInstance.Levelize(blackPoint, whitePoint, gamma, ImageMagick.Channels.Undefined);
=> InverseLevel(blackPoint, whitePoint, gamma, ImageMagick.Channels.Undefined);

/// <summary>
/// Applies the reversed level operation to just the specific channels specified. It compresses
Expand All @@ -3593,7 +3593,7 @@ public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointP
/// <param name="channels">The channel(s) to level.</param>
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
public void InverseLevel(QuantumType blackPoint, QuantumType whitePoint, double gamma, Channels channels)
=> _nativeInstance.Levelize(blackPoint, whitePoint, gamma, channels);
=> _nativeInstance.InverseLevel(blackPoint, whitePoint, gamma, channels);

/// <summary>
/// Applies the reversed level operation to just the specific channels specified. It compresses
Expand Down
58 changes: 29 additions & 29 deletions src/Magick.NET/Native/MagickImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ public static class X64
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_InterpolativeResize(IntPtr Instance, IntPtr geometry, UIntPtr method, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_InverseLevel(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Kmeans(IntPtr Instance, UIntPtr numberColors, UIntPtr maxIterations, double tolerance, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_Kuwahara(IntPtr Instance, double radius, double sigma, out IntPtr exception);
Expand All @@ -408,8 +410,6 @@ public static class X64
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LevelColors(IntPtr Instance, IntPtr blackColor, IntPtr whiteColor, UIntPtr channels, [MarshalAs(UnmanagedType.Bool)] bool invert, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Levelize(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LinearStretch(IntPtr Instance, double blackPoint, double whitePoint, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_LiquidRescale(IntPtr Instance, IntPtr geometry, double deltaX, double rigidity, out IntPtr exception);
Expand Down Expand Up @@ -965,6 +965,8 @@ public static class ARM64
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_InterpolativeResize(IntPtr Instance, IntPtr geometry, UIntPtr method, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_InverseLevel(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Kmeans(IntPtr Instance, UIntPtr numberColors, UIntPtr maxIterations, double tolerance, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_Kuwahara(IntPtr Instance, double radius, double sigma, out IntPtr exception);
Expand All @@ -973,8 +975,6 @@ public static class ARM64
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LevelColors(IntPtr Instance, IntPtr blackColor, IntPtr whiteColor, UIntPtr channels, [MarshalAs(UnmanagedType.Bool)] bool invert, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Levelize(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LinearStretch(IntPtr Instance, double blackPoint, double whitePoint, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_LiquidRescale(IntPtr Instance, IntPtr geometry, double deltaX, double rigidity, out IntPtr exception);
Expand Down Expand Up @@ -1530,6 +1530,8 @@ public static class X86
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_InterpolativeResize(IntPtr Instance, IntPtr geometry, UIntPtr method, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_InverseLevel(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Kmeans(IntPtr Instance, UIntPtr numberColors, UIntPtr maxIterations, double tolerance, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_Kuwahara(IntPtr Instance, double radius, double sigma, out IntPtr exception);
Expand All @@ -1538,8 +1540,6 @@ public static class X86
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LevelColors(IntPtr Instance, IntPtr blackColor, IntPtr whiteColor, UIntPtr channels, [MarshalAs(UnmanagedType.Bool)] bool invert, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_Levelize(IntPtr Instance, double blackPoint, double whitePoint, double gamma, UIntPtr channels, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void MagickImage_LinearStretch(IntPtr Instance, double blackPoint, double whitePoint, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr MagickImage_LiquidRescale(IntPtr Instance, IntPtr geometry, double deltaX, double rigidity, out IntPtr exception);
Expand Down Expand Up @@ -6128,6 +6128,29 @@ public void InterpolativeResize(string geometry, PixelInterpolateMethod method)
if (result != IntPtr.Zero)
Instance = result;
}
public void InverseLevel(double blackPoint, double whitePoint, double gamma, Channels channels)
{
IntPtr exception = IntPtr.Zero;
#if PLATFORM_AnyCPU
if (Runtime.IsArm64)
#endif
#if PLATFORM_arm64 || PLATFORM_AnyCPU
NativeMethods.ARM64.MagickImage_InverseLevel(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
#if PLATFORM_AnyCPU
else if (Runtime.Is64Bit)
#endif
#if PLATFORM_x64 || PLATFORM_AnyCPU
NativeMethods.X64.MagickImage_InverseLevel(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
#if PLATFORM_AnyCPU
else
#endif
#if PLATFORM_x86 || PLATFORM_AnyCPU
NativeMethods.X86.MagickImage_InverseLevel(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
CheckException(exception);
}
public void Kmeans(int numberColors, int maxIterations, double tolerance)
{
IntPtr exception = IntPtr.Zero;
Expand Down Expand Up @@ -6225,29 +6248,6 @@ public void LevelColors(IMagickColor<QuantumType>? blackColor, IMagickColor<Quan
#endif
CheckException(exception);
}
public void Levelize(double blackPoint, double whitePoint, double gamma, Channels channels)
{
IntPtr exception = IntPtr.Zero;
#if PLATFORM_AnyCPU
if (Runtime.IsArm64)
#endif
#if PLATFORM_arm64 || PLATFORM_AnyCPU
NativeMethods.ARM64.MagickImage_Levelize(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
#if PLATFORM_AnyCPU
else if (Runtime.Is64Bit)
#endif
#if PLATFORM_x64 || PLATFORM_AnyCPU
NativeMethods.X64.MagickImage_Levelize(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
#if PLATFORM_AnyCPU
else
#endif
#if PLATFORM_x86 || PLATFORM_AnyCPU
NativeMethods.X86.MagickImage_Levelize(Instance, blackPoint, whitePoint, gamma, (NativeChannelsType)channels, out exception);
#endif
CheckException(exception);
}
public void LinearStretch(double blackPoint, double whitePoint)
{
IntPtr exception = IntPtr.Zero;
Expand Down
44 changes: 22 additions & 22 deletions src/Magick.NET/Native/MagickImage.json
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,28 @@
}
]
},
{
"name": "InverseLevel",
"throws": true,
"arguments": [
{
"name": "blackPoint",
"type": "double"
},
{
"name": "whitePoint",
"type": "double"
},
{
"name": "gamma",
"type": "double"
},
{
"name": "channels",
"type": "Channels"
}
]
},
{
"name": "Kmeans",
"throws": true,
Expand Down Expand Up @@ -1652,28 +1674,6 @@
}
]
},
{
"name": "Levelize",
"throws": true,
"arguments": [
{
"name": "blackPoint",
"type": "double"
},
{
"name": "whitePoint",
"type": "double"
},
{
"name": "gamma",
"type": "double"
},
{
"name": "channels",
"type": "Channels"
}
]
},
{
"name": "LinearStretch",
"throws": true,
Expand Down

0 comments on commit 86b4d94

Please sign in to comment.