Show / Hide Table of Contents

Class Operation

Wrap a NetVips.Internal.VipsOperation object.

Inheritance
object
CriticalFinalizerObject
SafeHandle
GObject
VipsObject
Operation
Implements
IDisposable
Inherited Members
VipsObject.OnPostClose
VipsObject.GetTypeOf(string)
VipsObject.GetBlurb(string)
VipsObject.GetDescription()
GObject.SignalConnect<T>(string, T, nint)
GObject.SignalHandlerDisconnect(ulong)
GObject.SignalHandlersDisconnectByFunc<T>(T, nint)
GObject.SignalHandlersDisconnectByData(nint)
GObject.ReleaseHandle()
GObject.IsInvalid
SafeHandle.handle
SafeHandle.Close()
SafeHandle.DangerousAddRef(ref bool)
SafeHandle.DangerousGetHandle()
SafeHandle.DangerousRelease()
SafeHandle.Dispose()
SafeHandle.Dispose(bool)
SafeHandle.SetHandle(IntPtr)
SafeHandle.SetHandleAsInvalid()
SafeHandle.IsClosed
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class Operation : VipsObject, IDisposable

Methods

Block(string, bool)

Set the block state on all operations in the libvips class hierarchy at name and below.

Declaration
public static void Block(string name, bool state)
Parameters
Type Name Description
string name

Set block state at this point and below.

bool state

The block state to set.

Remarks

For example:

Operation.Block("VipsForeignLoad", true);
Operation.Block("VipsForeignLoadJpeg", false);

Will block all load operations, except JPEG. Use:

$ vips -l

at the command-line to see the class hierarchy. Use BlockUntrusted to set the block state on all untrusted operations.

This call does nothing if the named operation is not found. At least libvips 8.13 is needed.

Call(string, VOption, Image, params object[])

Call a libvips operation.

Declaration
public static object Call(string operationName, VOption kwargs = null, Image matchImage = null, params object[] args)
Parameters
Type Name Description
string operationName

Operation name.

VOption kwargs

Optional arguments.

Image matchImage

A Image used as guide.

object[] args

An arbitrary number and variety of arguments.

Returns
Type Description
object

A new object.

Remarks

Use this method to call any libvips operation. For example:

using Image blackImage = Operation.Call("black", 10, 10) as Image;

See the Introduction for notes on how this works.

Call(string, VOption, params object[])

Call a libvips operation.

Declaration
public static object Call(string operationName, VOption kwargs = null, params object[] args)
Parameters
Type Name Description
string operationName

Operation name.

VOption kwargs

Optional arguments.

object[] args

An arbitrary number and variety of arguments.

Returns
Type Description
object

A new object.

Remarks

Use this method to call any libvips operation. For example:

using Image blackImage = Operation.Call("black", 10, 10) as Image;

See the Introduction for notes on how this works.

Call(string, params object[])

Call a libvips operation.

Declaration
public static object Call(string operationName, params object[] args)
Parameters
Type Name Description
string operationName

Operation name.

object[] args

An arbitrary number and variety of arguments.

Returns
Type Description
object

A new object.

Remarks

Use this method to call any libvips operation. For example:

using Image blackImage = Operation.Call("black", 10, 10) as Image;

See the Introduction for notes on how this works.

GetFlags()

Lookup the set of flags for this operation.

Declaration
public Enums.OperationFlags GetFlags()
Returns
Type Description
Enums.OperationFlags

Flags for this operation.

NewFromName(string)

Create a new NetVips.Internal.VipsOperation with the specified nickname.

Declaration
public static Operation NewFromName(string operationName)
Parameters
Type Name Description
string operationName

Nickname of operation to create.

Returns
Type Description
Operation

The new operation.

Remarks

You'll need to set any arguments and build the operation before you can use it. See for a higher-level way to make new operations.

Exceptions
Type Condition
VipsException

If the operation doesn't exist.

Implements

IDisposable
In this article
Back to top Generated by DocFX