Class Vips

java.lang.Object
app.photofox.vipsffm.Vips

public class Vips extends Object

Helper class for running Vips commands with an appropriate arena

Blocks untrusted operations by default

  • Constructor Details

    • Vips

      public Vips()
  • Method Details

    • init

      public static void init()
      Note that you do not usually need to call init() yourself, as initialisation is performed automatically when vips-ffm classes are used
    • init

      @Deprecated(forRemoval=true) public static void init(boolean allowUntrusted, boolean detectLeaks)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please migrate to using allowUntrustedOperations() and enableLeakDetection(), and note that calling init() is no longer required
    • run

      public static void run(VipsRunnable runnable)

      Provides a scoped arena to provide a memory boundary for running libvips operations

      After the scope has ended, any memory allocated whilst using libvips within it will be freed

    • shutdown

      public static void shutdown()
    • enableLeakDetection

      public static void enableLeakDetection()

      Enables leak detection

      Calling shutdown() will make libvips print out any leaks, and what classes hold memory references causing these leaks

    • allowUntrustedOperations

      public static void allowUntrustedOperations()

      Permits untrusted operations, such as loading PDFs

      vips-ffm blocks these by default - see the libvips docs for guidance

    • disableOperationCache

      public static void disableOperationCache()

      Disables the libvips operations cache

      At the time of writing libvips caches 100 operations by default, which might not be useful in long-running applications (like servers).

      See also: libvips docs