C# Class VrSharp.VrTextureEncoder

ファイルを表示 Open project: nickworonekin/puyotools

Protected Properties

Property Type Description
dataCodec VrDataCodec
decodedBitmap Bitmap
decodedData byte[]
globalIndex uint
hasGlobalIndex bool
initalized bool
paletteEncoder VpPaletteEncoder
pixelCodec VrPixelCodec
textureHeight ushort
texturePalette byte[][]
textureWidth ushort

Public Methods

Method Description
Save ( Stream destination ) : void

Saves the encoded texture to the specified stream.

Save ( string path ) : void

Saves the encoded texture to the specified path.

ToArray ( ) : byte[]

Returns the encoded texture as a byte array.

ToStream ( ) : MemoryStream

Returns the encoded texture as a stream.

VrTextureEncoder ( Bitmap source ) : System
VrTextureEncoder ( Stream source ) : System
VrTextureEncoder ( Stream source, int length ) : System
VrTextureEncoder ( byte source ) : System
VrTextureEncoder ( byte source, int offset, int length ) : System
VrTextureEncoder ( string file ) : System

Protected Methods

Method Description
BitmapToRaw ( Bitmap source ) : byte[]
BitmapToRawIndexed ( Bitmap source, int maxColors, byte &palette ) : byte[]
BitmapToRawResized ( Bitmap source, int size, int minSize ) : byte[]
EncodeTexture ( ) : MemoryStream

Private Methods

Method Description
HasValidDimensions ( int width, int height ) : bool
Initalize ( Bitmap source ) : void

Method Details

BitmapToRaw() protected method

protected BitmapToRaw ( Bitmap source ) : byte[]
source System.Drawing.Bitmap
return byte[]

BitmapToRawIndexed() protected method

protected BitmapToRawIndexed ( Bitmap source, int maxColors, byte &palette ) : byte[]
source System.Drawing.Bitmap
maxColors int
palette byte
return byte[]

BitmapToRawResized() protected method

protected BitmapToRawResized ( Bitmap source, int size, int minSize ) : byte[]
source System.Drawing.Bitmap
size int
minSize int
return byte[]

EncodeTexture() protected abstract method

protected abstract EncodeTexture ( ) : MemoryStream
return System.IO.MemoryStream

Save() public method

Saves the encoded texture to the specified stream.
public Save ( Stream destination ) : void
destination Stream The stream to save the texture to.
return void

Save() public method

Saves the encoded texture to the specified path.
public Save ( string path ) : void
path string Name of the file to save the data to.
return void

ToArray() public method

Returns the encoded texture as a byte array.
public ToArray ( ) : byte[]
return byte[]

ToStream() public method

Returns the encoded texture as a stream.
public ToStream ( ) : MemoryStream
return MemoryStream

VrTextureEncoder() public method

public VrTextureEncoder ( Bitmap source ) : System
source Bitmap
return System

VrTextureEncoder() public method

public VrTextureEncoder ( Stream source ) : System
source Stream
return System

VrTextureEncoder() public method

public VrTextureEncoder ( Stream source, int length ) : System
source Stream
length int
return System

VrTextureEncoder() public method

public VrTextureEncoder ( byte source ) : System
source byte
return System

VrTextureEncoder() public method

public VrTextureEncoder ( byte source, int offset, int length ) : System
source byte
offset int
length int
return System

VrTextureEncoder() public method

public VrTextureEncoder ( string file ) : System
file string
return System

Property Details

dataCodec protected_oe property

protected VrDataCodec dataCodec
return VrDataCodec

decodedBitmap protected_oe property

protected Bitmap decodedBitmap
return Bitmap

decodedData protected_oe property

protected byte[] decodedData
return byte[]

globalIndex protected_oe property

protected uint globalIndex
return uint

hasGlobalIndex protected_oe property

protected bool hasGlobalIndex
return bool

initalized protected_oe property

protected bool initalized
return bool

paletteEncoder protected_oe property

protected VpPaletteEncoder paletteEncoder
return VpPaletteEncoder

pixelCodec protected_oe property

protected VrPixelCodec pixelCodec
return VrPixelCodec

textureHeight protected_oe property

protected ushort textureHeight
return ushort

texturePalette protected_oe property

protected byte[][] texturePalette
return byte[][]

textureWidth protected_oe property

protected ushort textureWidth
return ushort