private void ResizeButton_Click(object sender, EventArgs e)
        {
            if (LastSelectedImageMetadata == null)
            {
                return;
            }

            using (var rw = new ResizeImageWindow(LastSelectedImageMetadata.Width, LastSelectedImageMetadata.Height))
            {
                if (rw.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                var newSize = rw.NewSize;
                ProcessImage(x => FirmwareImageProcessor.ResizeImage(x, newSize), LastSelectedImageMetadata, true);
                ImageListBox_SelectedValueChanged(ImageListBox, EventArgs.Empty);
            }
        }
        private void UpdateStringPreview()
        {
            if (LastSelectedStringMetadata == null)
            {
                return;
            }

            var firmwareString = m_firmware.ReadString(LastSelectedStringMetadata);
            var charMetadatas  = new List <FirmwareImageMetadata>();

            foreach (var charIndex in firmwareString)
            {
                var metadata = CurrentImageBlockForStrings.FirstOrDefault(x => x.Index == charIndex);
                if (metadata != null)
                {
                    charMetadatas.Add(metadata);
                }
            }

            var images = new List <bool[, ]>();

            foreach (var charMetadata in charMetadatas)
            {
                var image = m_firmware.ReadImage(charMetadata);
                if (m_firmware.Definition.CharsToCorrect != null && m_firmware.Definition.CharsToCorrect.Contains((byte)charMetadata.Index))
                {
                    var imageSize = image.GetSize();
                    image = FirmwareImageProcessor.ResizeImage(image, new Size(imageSize.Width, imageSize.Height + 2));
                    image = FirmwareImageProcessor.ShiftDown(image);
                    image = FirmwareImageProcessor.ShiftDown(image);
                }
                images.Add(image);
            }
            var data     = FirmwareImageProcessor.MergeImages(images);
            var dataSize = data.GetSize();

            StringPreviewImageSizeLabel.Text = dataSize.Width + @"x" + dataSize.Height;
            StringPrewviewPixelGrid.Data     = data;
        }