Show / Hide Table of Contents

Class BaseImageFile

Provides base image handling for all Daggerfall image files. This class is inherited from and extended by Arena2.TextureFile, Arena2.ImgFile, etc.

Inheritance
Object
BaseImageFile
BssFile
CfaFile
CifRciFile
GfxFile
ImgFile
SkyFile
TextureFile
SaveImage
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public abstract class BaseImageFile

Constructors

| Improve this Doc View Source

BaseImageFile()

Default constructor.

Declaration
public BaseImageFile()

Fields

| Improve this Doc View Source

myPalette

Palette for building image data

Declaration
protected DFPalette myPalette
Field Value
Type Description
DFPalette

Properties

| Improve this Doc View Source

Description

Gets description of this file.

Declaration
public abstract string Description { get; }
Property Value
Type Description
String
| Improve this Doc View Source

FileName

Gets file name only of managed file.

Declaration
public string FileName { get; }
Property Value
Type Description
String
| Improve this Doc View Source

FilePath

Gets full path of managed file.

Declaration
public string FilePath { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Palette

Gets or sets palette for building images.

Declaration
public DFPalette Palette { get; set; }
Property Value
Type Description
DFPalette
| Improve this Doc View Source

PaletteName

Gets correct palette name for this file.

Declaration
public abstract string PaletteName { get; }
Property Value
Type Description
String
| Improve this Doc View Source

RecordCount

Gets total number of records in this file.

Declaration
public abstract int RecordCount { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

GetColor32(DFBitmap, Int32)

Gets a Color32 array for engine with minimum options.

Declaration
public Color32[] GetColor32(DFBitmap srcBitmap, int alphaIndex = -1)
Parameters
Type Name Description
DFBitmap srcBitmap

Source DFBitmap.

Int32 alphaIndex

Index to receive transparent alpha.

Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

GetColor32(DFBitmap, Int32, Int32, out DFSize, Int32, Int32)

Gets a Color32 array for engine.

Declaration
public Color32[] GetColor32(DFBitmap srcBitmap, int alphaIndex, int border, out DFSize sizeOut, int emissionIndex = -1, int customAlphaValue = 255)
Parameters
Type Name Description
DFBitmap srcBitmap

Source DFBitmap.

Int32 alphaIndex

Index to receive transparent alpha.

Int32 border

Number of pixels border to add around image.

DFSize sizeOut

Receives image dimensions with borders included.

Int32 emissionIndex

Force matching emissive index to non-transparent.

Int32 customAlphaValue
Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

GetColor32(Int32, Int32, Int32)

Gets a Color32 array for engine with minimum options.

Declaration
public Color32[] GetColor32(int record, int frame, int alphaIndex = -1)
Parameters
Type Name Description
Int32 record

Index of record.

Int32 frame

Index of frame.

Int32 alphaIndex

Index to receive transparent alpha.

Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

GetColor32(Int32, Int32, Int32, Int32, out DFSize)

Gets a Color32 array for engine with a border.

Declaration
public Color32[] GetColor32(int record, int frame, int alphaIndex, int border, out DFSize sizeOut)
Parameters
Type Name Description
Int32 record

Record index.

Int32 frame

Frame index.

Int32 alphaIndex

Index to receive transparent alpha.

Int32 border

Number of pixels border to add around image.

DFSize sizeOut

Receives image dimensions with borders included.

Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

GetDFBitmap(Int32, Int32)

Gets bitmap data as indexed 8-bit byte array for specified record and frame.

Declaration
public abstract DFBitmap GetDFBitmap(int record, int frame)
Parameters
Type Name Description
Int32 record

Index of record.

Int32 frame

Index of frame.

Returns
Type Description
DFBitmap

DFBitmap object.

| Improve this Doc View Source

GetFireWallColors32(ref Color32[], Int32, Int32, Color, Single)

Declaration
public Color32[] GetFireWallColors32(ref Color32[] srcTexture, int width, int height, Color neutralColor, float scale)
Parameters
Type Name Description
Color32[] srcTexture
Int32 width
Int32 height
Color neutralColor
Single scale
Returns
Type Description
Color32[]
| Improve this Doc View Source

GetFrameCount(Int32)

Gets number of frames in specified record.

Declaration
public abstract int GetFrameCount(int record)
Parameters
Type Name Description
Int32 record

Index of record.

Returns
Type Description
Int32

Number of frames.

| Improve this Doc View Source

GetSize(Int32)

Gets width and height of specified record. All frames of this record are the same dimensions.

Declaration
public abstract DFSize GetSize(int record)
Parameters
Type Name Description
Int32 record

Index of record.

Returns
Type Description
DFSize

DFSize object.

| Improve this Doc View Source

GetSpectralEmissionColors32(DFBitmap, Color32[], Int32, Int32, Color, Color)

Gets a Color32 array as emission map for spectral textures (glowing eyes). Needs extra handling for borders as spectral textures might be atlased.

Declaration
public Color32[] GetSpectralEmissionColors32(DFBitmap srcBitmap, Color32[] albedoColors, int borderSize, int eyesEmissionIndex, Color eyeEmission, Color otherEmission)
Parameters
Type Name Description
DFBitmap srcBitmap

Source bitmap.

Color32[] albedoColors
Int32 borderSize

Size of border for atlased textures.

Int32 eyesEmissionIndex

Index to receive emission colour.

Color eyeEmission

Amount of emission to apply to other parts of body (black=none, white=full).

Color otherEmission

Amount of emission to apply to other parts of body (black=none, white=full).

Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

GetWindowColors32(DFBitmap, Int32)

Gets a Color32 array as emission map based for window textures.

Declaration
public Color32[] GetWindowColors32(DFBitmap srcBitmap, int emissionIndex = 255)
Parameters
Type Name Description
DFBitmap srcBitmap

Source bitmap.

Int32 emissionIndex

Index to receive emission colour.

Returns
Type Description
Color32[]

Color32 array.

| Improve this Doc View Source

Load(String, FileUsage, Boolean)

Loads an image file.

Declaration
public abstract bool Load(string filePath, FileUsage usage, bool readOnly)
Parameters
Type Name Description
String filePath

Absolute path to file

FileUsage usage

Specify if file will be accessed from disk, or loaded into RAM.

Boolean readOnly

File will be read-only if true, read-write if false.

Returns
Type Description
Boolean

True if successful, otherwise false.

| Improve this Doc View Source

LoadPalette(String)

Loads a Daggerfall palette that will be used for building images.

Declaration
public bool LoadPalette(string filePath)
Parameters
Type Name Description
String filePath

Absolute path to Daggerfall palette.

Returns
Type Description
Boolean

True if successful, otherwise false.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX