Class Source
An input connection.
Inheritance
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class Source : Connection, IDisposable
Methods
Dispose(bool)
Manage GObject lifetime.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
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 |
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 |
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 |
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 |
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 |
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 |