Show / Hide Table of Contents

Class Source

An input connection.

Inheritance
object
CriticalFinalizerObject
SafeHandle
GObject
VipsObject
Connection
Source
SourceCustom
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.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 Source : Connection, IDisposable

Methods

Dispose(bool)

Manage NetVips.Internal.GObject lifetime.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing
Overrides
SafeHandle.Dispose(bool)

NewFromDescriptor(int)

Make a new source from a file descriptor (a small integer).

Declaration
public static Source NewFromDescriptor(int descriptor)
Parameters
Type Name Description
int descriptor

Read from this file descriptor.

Returns
Type Description
Source

A new Source.

Remarks

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

using var source = Source.NewFromDescriptor(0);

Makes a descriptor attached to stdin.

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from descriptor.

NewFromFile(string)

Make a new source from a filename.

Declaration
public static Source NewFromFile(string filename)
Parameters
Type Name Description
string filename

Read from this filename.

Returns
Type Description
Source

A new Source.

Remarks

Make a new source that is attached to the named file. For example:

using var source = Source.NewFromFile("myfile.jpg");

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from filename.

NewFromMemory(byte[])

Make a new source from a memory object.

Declaration
public static Source NewFromMemory(byte[] data)
Parameters
Type Name Description
byte[] data

The memory object.

Returns
Type Description
Source

A new Source.

Remarks

Make a new source that is attached to the memory object. For example:

using var source = Source.NewFromMemory(data);

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from data.

NewFromMemory(char[])

Make a new source from a memory object.

Declaration
public static Source NewFromMemory(char[] data)
Parameters
Type Name Description
char[] data

The memory object.

Returns
Type Description
Source

A new Source.

Remarks

Make a new source that is attached to the memory object. For example:

using var source = Source.NewFromMemory(data);

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from data.

NewFromMemory(ReadOnlySpan<byte>)

Make a new source from a memory object.

Declaration
public static Source NewFromMemory(ReadOnlySpan<byte> data)
Parameters
Type Name Description
ReadOnlySpan<byte> data

The memory object.

Returns
Type Description
Source

A new Source.

Remarks

Make a new source that is attached to the memory object. For example:

using var source = Source.NewFromMemory(data);

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from data.

NewFromMemory(string)

Make a new source from a memory object.

Declaration
public static Source NewFromMemory(string data)
Parameters
Type Name Description
string data

The memory object.

Returns
Type Description
Source

A new Source.

Remarks

Make a new source that is attached to the memory object. For example:

using var source = Source.NewFromMemory(data);

You can pass this source to (for example) NewFromSource(Source, string, Access?, FailOn?, VOption).

Exceptions
Type Condition
VipsException

If unable to create a new Source from data.

Implements

IDisposable
In this article
Back to top Generated by DocFX