Class GtfImage
Provides properties and methods to read textures from a GTF file.
Implements
Inherited Members
Namespace: GtfDdsSharp
Assembly: GtfDdsSharp.dll
Syntax
public class GtfImage : IReadOnlyList<GtfTexture>, IReadOnlyCollection<GtfTexture>, IEnumerable<GtfTexture>, IEnumerable, IDisposable
Constructors
| Name | Description |
|---|---|
| GtfImage(byte[]) | Initializes a new instance of the GtfImage class from the specified array. |
| GtfImage(byte[], int, int) | Initializes a new instance of the GtfImage class from the specified array region. |
| GtfImage(Stream) | Initializes a new instance of the GtfImage class from the specified stream. |
| GtfImage(nint, uint) | Initializes a new instance of the GtfImage class from the specified memory address. |
| GtfImage(ReadOnlySpan<byte>) | Initializes a new instance of the GtfImage class from the specified region of memory. |
| GtfImage(string) | Initializes a new instance of the GtfImage class from the specified file. |
Fields
| Name | Description |
|---|---|
| DefaultVersion | The default version of a GTF file header: v202.00.00. |
Properties
| Name | Description |
|---|---|
| Count | Gets the number of textures. |
| Data | Gets a pointer to the file data. |
| GtfHeader | Gets the GTF file header. |
| IsClosed | Gets whether the GtfImage was disposed. |
| this[int] | Gets the texture at the specified index. |
| Size | Gets the size of the file data in bytes. |
| Textures | Gets the GTF texture attributes. |
Methods
| Name | Description |
|---|---|
| ConvertToDds(string, int?) | Converts the specified GTF file to a DDS file. |
| ConvertToDds(string, string, int?) | Converts the specified GTF file to a DDS file. |
| Dispose() | Releases all resources used by this GtfImage. |
| Dispose(bool) | Releases the unmanaged resources used by the GtfImage and optionally releases the managed resources. |
| ~GtfImage() | Frees unmanaged memory in the event that the GtfImage is not properly disposed. |
| GetEnumerator() | Returns an enumerator that iterates through the collection. |
| GetTextureAttribute(int) | Gets the texture attribute at the specified index. |