Show / Hide Table of Contents

Class Target

An output connection.

Inheritance
object
CriticalFinalizerObject
SafeHandle
GObject
VipsObject
Connection
Target
TargetCustom
Implements
IDisposable
Inherited Members
Connection.GetFileName()
Connection.GetNick()
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 Target : Connection, IDisposable

Properties

Blob

Get the memory object held by the target when using NewToMemory().

Declaration
public byte[] Blob { get; }
Property Value
Type Description
byte[]

Methods

NewToDescriptor(int)

Make a new target to write to a file descriptor (a small integer).

Declaration
public static Target NewToDescriptor(int descriptor)
Parameters
Type Name Description
int descriptor

Write to this file descriptor.

Returns
Type Description
Target

A new Target.

Remarks

Make a new target that is attached to the descriptor. For example:

using var target = Target.NewToDescriptor(1);

Makes a descriptor attached to stdout.

You can pass this target to (for example) WriteToTarget(Target, string, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Target from descriptor.

NewToFile(string)

Make a new target to write to a file.

Declaration
public static Target NewToFile(string filename)
Parameters
Type Name Description
string filename

Write to this this file.

Returns
Type Description
Target

A new Target.

Remarks

Make a new target that will write to the named file. For example:

using var target = Target.NewToFile("myfile.jpg");

You can pass this target to (for example) WriteToTarget(Target, string, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Target from filename.

NewToMemory()

Make a new target to write to an area of memory.

Declaration
public static Target NewToMemory()
Returns
Type Description
Target

A new Target.

Remarks

Make a new target that will write to memory. For example:

using var target = Target.NewToMemory();

You can pass this target to (for example) WriteToTarget(Target, string, VOption).

After writing to the target, fetch the bytes from the target object with:

var bytes = target.Blob;
Exceptions
Type Condition
VipsException

If unable to create a new Target.

Implements

IDisposable
In this article
Back to top Generated by DocFX