Class Vips
java.lang.Object
app.photofox.vipsffm.Vips
Helper class for running Vips commands with an appropriate arena
Blocks untrusted operations by default
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Permits untrusted operations, such as loading PDFsstatic void
Disables the libvips operations cachestatic void
Enables leak detectionstatic void
init()
Note that you do not usually need to callinit()
yourself, as initialisation is performed automatically when vips-ffm classes are usedstatic void
init
(boolean allowUntrusted, boolean detectLeaks) Deprecated, for removal: This API element is subject to removal in a future version.static void
run
(VipsRunnable runnable) Provides a scoped arena to provide a memory boundary for running libvips operationsstatic void
shutdown()
-
Constructor Details
-
Vips
public Vips()
-
-
Method Details
-
init
public static void init()Note that you do not usually need to callinit()
yourself, as initialisation is performed automatically when vips-ffm classes are used -
init
Deprecated, for removal: This API element is subject to removal in a future version.Please migrate to usingallowUntrustedOperations()
andenableLeakDetection()
, and note that callinginit()
is no longer required -
run
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
-
allowUntrustedOperations()
andenableLeakDetection()
, and note that callinginit()
is no longer required