Class TerrainImage
- Namespace
- Valheim.Testing
- Assembly
- Valheim.Testing.dll
A rendered RGB image, row 0 at the top.
public sealed class TerrainImage
- Inheritance
-
objectTerrainImage
Properties
Height
public int Height { get; }
Property Value
- int
this[int, int]
public RenderColor this[int px, int py] { get; }
Parameters
pxintpyint
Property Value
Width
public int Width { get; }
Property Value
- int
Methods
ToPng()
Encodes a truecolour 8-bit PNG. The image data uses uncompressed (stored) deflate blocks, so the bytes do not depend on a runtime's zlib version: about three bytes per pixel. Recompress with any PNG tool if size matters.
public byte[] ToPng()
Returns
- byte[]
WritePng(string)
public void WritePng(string path)
Parameters
pathstring