private void UpdatePreview() { if (!Preview_checkBox.Checked) { return; } DdsFile previewDDS = new DdsFile(); previewDDS.CreateImage(originalDDS, false); contrastTrackbarValue = PurifyAmount_trackBar.Value; brightTrackbarValue = Brightness_trackBar.Value; previewDDS.SetPixels(AdjustColors); previewDDS.SetPixels(TatPreview); Preview_pictureBox.Image = previewDDS.Image; previewDDS.Dispose(); }
internal void Update_DDSdisplay() { if (dds == null) { return; } Wait_label.Visible = true; Wait_label.Refresh(); DdsFile preview = new DdsFile(); preview.CreateImage(dds, false); preview.SetPixels(TatPreview); if (!preview.Size.Equals(new System.Drawing.Size(512, 512))) { preview = preview.Resize(new System.Drawing.Size(512, 512)); } Preview_pictureBox.Image = preview.Image; preview.Dispose(); Wait_label.Visible = false; Preset1_button.Font = (currentPreset == 0) ? new Font(Preset1_button.Font, FontStyle.Bold) : new Font(Preset1_button.Font, FontStyle.Regular); Preset2_button.Font = (currentPreset == 1) ? new Font(Preset2_button.Font, FontStyle.Bold) : new Font(Preset2_button.Font, FontStyle.Regular); Preset3_button.Font = (currentPreset == 2) ? new Font(Preset3_button.Font, FontStyle.Bold) : new Font(Preset3_button.Font, FontStyle.Regular); Resize_checkBox.Checked = !dds.Size.Equals(new System.Drawing.Size(512, 512)); }