public Tile(Image pImage, Palette pPalette) : this(Guid.NewGuid(), string.Empty, pImage, pPalette) { }
public Tile(Guid pUID, string pName, Image pImage, Palette pPalette) { this.mUID = pUID; this.mImage = (pImage is Bitmap ? (Bitmap)pImage : new Bitmap(pImage)); this.mName = pName; this.mPalette = pPalette; }
public static Bitmap MapBitmapColorsToPalette(Bitmap pTarget, Palette pPal) { for (int x = 0; x < pTarget.Width; x++) { for (int y = 0; y < pTarget.Height; y++) { pTarget.SetPixel(x, y, pPal.GetNearestColor(pTarget.GetPixel(x, y))); } } return pTarget; }
public void ChangePalette(Palette pPalette) { //TODO }
private static Color GetColorFromPalette(int pVal, Palette pPalette) { return(pPalette.mColors[pVal]); }