C# Class NSMBe4.ImageIndexer

Mostra file Open project: Dirbaio/NSMB-Editor Class Usage Examples

Public Properties

Property Type Description
imageData ].Byte[
palettes Color[][]

Public Methods

Method Description
ImageIndexer ( List bl ) : System
ImageIndexer ( List bl, bool useAlpha ) : System
ImageIndexer ( List bl, int paletteCount, bool useAlpha, int transpCol ) : System
closest ( Color c, Color palette ) : byte
colorDifference ( Color a, Color b ) : float
colorDifferenceWithoutAlpha ( Color a, Color b ) : float
createPaletteForImage ( Bitmap b ) : Color[]
createPaletteForImage ( Bitmap b, int palLen ) : Color[]
getTiledImageData ( ) : byte[]
getTiledImageDataPart ( int px, int py, int ptx, int pty ) : byte[]
indexImageWithPalette ( Bitmap b, Color palette ) : byte[]
previewImage ( int i ) : Bitmap
reduce ( int c ) : byte

Private Methods

Method Description
closestMultiColor ( MultiColor mc ) : byte
getDominantBox ( ) : Box
median ( List values, int total ) : byte
shrinkBox ( Box b ) : Box
split ( Box b ) : void

Method Details

ImageIndexer() public method

public ImageIndexer ( List bl ) : System
bl List
return System

ImageIndexer() public method

public ImageIndexer ( List bl, bool useAlpha ) : System
bl List
useAlpha bool
return System

ImageIndexer() public method

public ImageIndexer ( List bl, int paletteCount, bool useAlpha, int transpCol ) : System
bl List
paletteCount int
useAlpha bool
transpCol int
return System

closest() public static method

public static closest ( Color c, Color palette ) : byte
c Color
palette Color
return byte

colorDifference() public static method

public static colorDifference ( Color a, Color b ) : float
a Color
b Color
return float

colorDifferenceWithoutAlpha() public static method

public static colorDifferenceWithoutAlpha ( Color a, Color b ) : float
a Color
b Color
return float

createPaletteForImage() public static method

public static createPaletteForImage ( Bitmap b ) : Color[]
b System.Drawing.Bitmap
return Color[]

createPaletteForImage() public static method

public static createPaletteForImage ( Bitmap b, int palLen ) : Color[]
b System.Drawing.Bitmap
palLen int
return Color[]

getTiledImageData() public method

public getTiledImageData ( ) : byte[]
return byte[]

getTiledImageDataPart() public method

public getTiledImageDataPart ( int px, int py, int ptx, int pty ) : byte[]
px int
py int
ptx int
pty int
return byte[]

indexImageWithPalette() public static method

public static indexImageWithPalette ( Bitmap b, Color palette ) : byte[]
b System.Drawing.Bitmap
palette Color
return byte[]

previewImage() public method

public previewImage ( int i ) : Bitmap
i int
return System.Drawing.Bitmap

reduce() public static method

public static reduce ( int c ) : byte
c int
return byte

Property Details

imageData public_oe property

public Byte[,] imageData
return ].Byte[

palettes public_oe property

public Color[][] palettes
return Color[][]