コード例 #1
0
        private void btnLoadBMP_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "Bitmap|*.bmp";

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                inputFilePathEncoder = ofd.FileName;

                fileReaderObject = Helpers.ReadBmpFormat(inputFilePathEncoder, false);
                pictureBoxOriginalImage.Image = fileReaderObject.GetBmpImage();

                BmpWvlFileObject.auxImage = fileReaderObject.GetBmpData();

                waveletImage = fileReaderObject.GetBmpFloatData();
                pictureBoxWaveletImage.Image = Helpers.BuildBitmapFromMatrix(waveletImage);
            }
        }
コード例 #2
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            try
            {
                if (fileReaderObject == null)
                {
                    throw new NullReferenceException();
                }

                waveletImage = fileReaderObject.GetBmpFloatData();

                numericUpDownX.Value         = numericUpDownX.Maximum;
                numericUpDownY.Value         = numericUpDownY.Maximum;
                pictureBoxWaveletImage.Image = Helpers.BuildBitmapFromMatrix(waveletImage);
            }
            catch (NullReferenceException)
            {
                MessageBox.Show("Warning: You forgot to load image first!");
            }
        }