Class EncodeSettings
How encode() should build the file. The defaults produce what the client ships most: DXT compression with the block format chosen from the alpha depth (0 -> BC1, 1 -> BC1 punch-through, 4 -> BC2, 8 -> BC3), with a full generated mip chain.
public class EncodeSettings : IDisposable
- Inheritance
-
EncodeSettings
- Implements
- Inherited Members
Constructors
EncodeSettings()
public EncodeSettings()
EncodeSettings(ColorEncoding, PixelFormat, byte, bool)
public EncodeSettings(ColorEncoding encoding, PixelFormat format, byte alphaDepth, bool mipmaps)
Parameters
encodingColorEncodingformatPixelFormatalphaDepthbytemipmapsbool
EncodeSettings(EncodeSettings)
Copy-construct: a deep copy of other (the C++ copy constructor).
public EncodeSettings(EncodeSettings other)
Parameters
otherEncodeSettings
Properties
AlphaDepth
Alpha bits per pixel: 0, 1, 4 or 8. Selects the alpha plane depth for Palettized files and the block format for Dxt when format is Unspecified.
public byte AlphaDepth { get; set; }
Property Value
Encoding
The payload encoding to produce (Palettized, Dxt or Bgra; Jpeg is not supported).
public ColorEncoding Encoding { get; set; }
Property Value
Format
The DXT block format for Dxt encoding (Dxt1, Dxt3, Dxt5 or Bc5). Unspecified picks from alphaDepth: 0/1 -> Dxt1, 4 -> Dxt3, 8 -> Dxt5. Ignored for Palettized/Bgra.
public PixelFormat Format { get; set; }
Property Value
Mipmaps
Whether to generate the full mip chain down to 1x1 (box-filtered). Off: the file holds only level 0.
public bool Mipmaps { get; set; }
Property Value
Methods
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public virtual void Dispose()
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Reference-identity hash (the C++ type has no hash to mirror).
public override int GetHashCode()
Returns
Operators
operator ==(EncodeSettings?, EncodeSettings?)
public static bool operator ==(EncodeSettings? l, EncodeSettings? r)
Parameters
Returns
operator !=(EncodeSettings?, EncodeSettings?)
public static bool operator !=(EncodeSettings? l, EncodeSettings? r)