Exemple #1
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            invertFormAcces();
            panelDestination.BackgroundImage = null;
            Refresh();

            if (InputFile != null)
            {
                int.TryParse(textBoxThreshold.Text, out int threshold);
                int.TryParse(comboBoxDictionarySize.GetItemText(comboBoxDictionarySize.SelectedItem), out int dictionarySize);


                AvqCompression = new AVQ(InputFile);
                originalImage  = AvqCompression.StartCompression(threshold, dictionarySize);


                panelDestination.BackgroundImage = originalImage.GetBitMap();
            }
            else
            {
                MessageBox.Show("You need to choose an image!");
            }


            invertFormAcces();
        }
Exemple #2
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            invertFormAcces();
            panelDestination.BackgroundImage = null;

            if (InputFile != null)
            {
                bool drawBorder           = checkBoxDrawBorder.Checked;
                bool CompressedFileFormat = checkBoxCompressedFileFormat.Checked;
                int.TryParse(textBoxThreshold.Text, out int threshold);
                int.TryParse(textBoxDictionarySize.Text, out int dictionarySize);

                AvqCompression = new AVQ(InputFile);
                originalImage  = AvqCompression.StartCompression(threshold, dictionarySize, drawBorder, CompressedFileFormat);


                panelDestination.BackgroundImage = originalImage.GetBitMap();
            }
            else
            {
                MessageBox.Show("You need to choose an image!");
            }


            invertFormAcces();
        }