Class Source
An input connection.
Inheritance
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class Source : Connection, IDisposable
Methods
| Improve this Doc View SourceDispose(Boolean)
Manage NetVips.Internal.GObject lifetime.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
NewFromDescriptor(Int32)
Make a new source from a file descriptor (a small integer).
Declaration
public static Source NewFromDescriptor(int descriptor)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | 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:
var source = Source.NewFromDescriptor(0);
Makes a descriptor attached to stdin.
You can pass this source to (for example) NewFromSource(Source, String, String, Nullable<Boolean>, 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 |
---|---|---|
System.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:
var source = Source.NewFromFile("myfile.jpg");
You can pass this source to (for example) NewFromSource(Source, String, String, Nullable<Boolean>, 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 |
---|---|---|
System.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:
var source = Source.NewFromMemory(data);
You can pass this source to (for example) NewFromSource(Source, String, String, Nullable<Boolean>, 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 |
---|---|---|
System.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:
var source = Source.NewFromMemory(data);
You can pass this source to (for example) NewFromSource(Source, String, String, Nullable<Boolean>, 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 |
---|---|---|
System.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:
var source = Source.NewFromMemory(data);
You can pass this source to (for example) NewFromSource(Source, String, String, Nullable<Boolean>, VOption).
Exceptions
Type | Condition |
---|---|
VipsException | If unable to create a new Source from |