private void UseBackground_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { button3.BackColor = SpriteLib.GetMostCommon(new Bitmap(image)); } }
private void MakeTransparent_Click(object sender, EventArgs e) { Color c = button3.BackColor; if (checkBox1.Checked) { c = SpriteLib.GetMostCommon(new Bitmap(image)); } Bitmap bmp = new Bitmap(image); bmp.MakeTransparent(c); pictureBox1.Image = bmp; }
private void GenerateSprites() { if (radioButton1.Checked) { //Anti-clockwise sprites = SpriteLib.RotateImageAnti_clockwise(pictureBox1.Image, int.Parse(textBox1.Text)); } else if (radioButton2.Checked) { //Clockwise sprites = SpriteLib.RotateImageClockwise(pictureBox1.Image, int.Parse(textBox1.Text)); } spritesViewer1.LoadImages(sprites); }