예제 #1
0
            public Block(string Color, byte A, byte R, byte G, byte B)
            {
                this.Color = Color;

                this.A = A;
                this.R = R;
                this.G = G;
                this.B = B;

                this.ID = BlockID;
                BlockID++;

                CL = PixelArt.RGBtoLAB(R, G, B);
            }
예제 #2
0
        private void buttonOpenFile_Click(object sender, EventArgs e)
        {
            openFileDialog1.FileName = "Open Image File";
            openFileDialog1.ShowDialog();
            try
            {
                px1 = new PixelArt(new Bitmap(openFileDialog1.FileName, true));
            }
            catch (ArgumentException)
            {
                return;
            }
            pictureBoxPixelArtPreview.Image = px1.SrcImage;
            pictureBoxOutputPixelArt.Image  = px1.SrcImage;
            trackBar1.Value   = 100;
            trackBar1.Enabled = true;

            textBoxInputSize.Text  = px1.SrcImage.Width.ToString() + "x" + px1.SrcImage.Height.ToString();
            textBoxOutputSize.Text = textBoxInputSize.Text;
            trackBar1_Scroll(sender, e);
            buttonConvertColors.Enabled = true;
        }