Skip to content

Commit

Permalink
Remove deprecated utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Oct 14, 2024
1 parent 1448040 commit 663409b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 128 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
- Drop support for .NET Standard 2.0 and Mono. NetVips now targets .NET 6 (`net6.0`) and .NET Framework 4.5.2 (`net452`) moving forward.
See https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/ for more information.
- Remove deprecated utilities.

## [2.4.2] - 2024-10-13
### Fixed
Expand Down
128 changes: 0 additions & 128 deletions src/NetVips/NetVips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ public static void Shutdown()
Vips.Shutdown();
}

/// <summary>
/// Enable or disable libvips leak checking.
/// </summary>
/// <remarks>
/// With this enabled, libvips will check for object and area leaks on <see cref="Shutdown"/>.
/// Enabling this option will make libvips run slightly more slowly.
/// </remarks>
/// <param name="leak">Bool indicating if leak checking should be turned on.</param>
[Obsolete("NetVips.LeakSet is deprecated, please use the NetVips.Leak setter instead.")]
public static void LeakSet(bool leak)
{
Leak = leak;
}

/// <summary>
/// Enable or disable libvips leak checking.
/// </summary>
Expand All @@ -65,20 +51,6 @@ public static bool Leak
set => Vips.LeakSet(value);
}

/// <summary>
/// Enable or disable libvips profile recording.
/// </summary>
/// <remarks>
/// If set, vips will record profiling information, and dump it on <see cref="Shutdown"/>.
/// These profiles can be analyzed with the `vipsprofile` program.
/// </remarks>
/// <param name="profile">Bool indicating if profile recording should be turned on.</param>
[Obsolete("NetVips.ProfileSet is deprecated, please use the NetVips.Profile setter instead.")]
public static void ProfileSet(bool profile)
{
Profile = profile;
}

/// <summary>
/// Enable or disable libvips profile recording.
/// </summary>
Expand All @@ -91,67 +63,6 @@ public static bool Profile
set => Vips.ProfileSet(value);
}

/// <summary>
/// Set the maximum number of operations libvips will cache.
/// </summary>
/// <param name="max">Maximum number of operations.</param>
[Obsolete("NetVips.CacheSetMax is deprecated, please use the Cache.Max setter instead.")]
public static void CacheSetMax(int max)
{
Cache.Max = max;
}

/// <summary>
/// Limit the operation cache by memory use.
/// </summary>
/// <param name="maxMem">Maximum memory use.</param>
[Obsolete("NetVips.CacheSetMaxMem is deprecated, please use the Cache.MaxMem setter instead.")]
public static void CacheSetMaxMem(ulong maxMem)
{
Cache.MaxMem = maxMem;
}

/// <summary>
/// Limit the operation cache by number of open files.
/// </summary>
/// <param name="maxFiles">Maximum open files.</param>
[Obsolete("NetVips.CacheSetMaxFiles is deprecated, please use the Cache.MaxFiles setter instead.")]
public static void CacheSetMaxFiles(int maxFiles)
{
Cache.MaxFiles = maxFiles;
}

/// <summary>
/// Turn on libvips cache tracing.
/// </summary>
/// <param name="trace">Bool indicating if tracing should be turned on.</param>
[Obsolete("NetVips.CacheSetTrace is deprecated, please use the Cache.Trace setter instead.")]
public static void CacheSetTrace(bool trace)
{
Cache.Trace = trace;
}

/// <summary>
/// Set the size of the pools of worker threads vips uses for image evaluation.
/// </summary>
/// <param name="concurrency">The size of the pools of worker threads vips uses
/// for image evaluation.</param>
[Obsolete("NetVips.ConcurrencySet is deprecated, please use the NetVips.Concurrency setter instead.")]
public static void ConcurrencySet(int concurrency)
{
Concurrency = concurrency;
}

/// <summary>
/// Returns the number of worker threads that vips uses for image evaluation.
/// </summary>
/// <returns>The number of worker threads.</returns>
[Obsolete("NetVips.ConcurrencyGet is deprecated, please use the NetVips.Concurrency getter instead.")]
public static int ConcurrencyGet()
{
return Concurrency;
}

/// <summary>
/// Gets or sets the number of worker threads libvips' should create to process each image.
/// </summary>
Expand All @@ -161,16 +72,6 @@ public static int Concurrency
set => Vips.ConcurrencySet(value);
}

/// <summary>
/// Enable or disable SIMD.
/// </summary>
/// <param name="enabled">Bool indicating if SIMD should be turned on.</param>
[Obsolete("NetVips.VectorSet is deprecated, please use the NetVips.Vector setter instead.")]
public static void VectorSet(bool enabled)
{
Vector = enabled;
}

/// <summary>
/// Enable or disable SIMD.
/// </summary>
Expand Down Expand Up @@ -204,35 +105,6 @@ public static bool BlockUntrusted
set => Vips.BlockUntrustedSet(value);
}

/// <summary>
/// Returns an array with:
/// - the number of active allocations.
/// - the number of bytes currently allocated via `vips_malloc()` and friends.
/// - the number of open files.
/// </summary>
/// <returns>An array with memory stats. Handy for debugging / leak testing.</returns>
[Obsolete("NetVips.MemoryStats is deprecated, please use the Stats class instead.")]
public static int[] MemoryStats()
{
return new[]
{
Stats.Allocations,
Stats.Mem,
Stats.Files
};
}

/// <summary>
/// Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc().
/// Handy for estimating max memory requirements for a program.
/// </summary>
/// <returns>The largest number of bytes simultaneously allocated.</returns>
[Obsolete("NetVips.MemoryHigh is deprecated, please use the Stats.MemHighwater getter instead.")]
public static ulong MemoryHigh()
{
return Stats.MemHighwater;
}

/// <summary>
/// Get the major, minor or patch version number of the libvips library.
/// </summary>
Expand Down

0 comments on commit 663409b

Please sign in to comment.