private void btnResize_Click(object sender, EventArgs e) { if (ddsPanel1.ImageSize == Size.Empty) { return; } int width = ddsPanel1.ImageSize.Width; int height = ddsPanel1.ImageSize.Height; NewDDSParameters parms = new NewDDSParameters(ddsPanel1.ImageSize.Width, ddsPanel1.ImageSize.Height, ddsPanel1.UseDXT, ddsPanel1.AlphaDepth, true, ddsPanel1.UseLuminance); DialogResult dr = parms.ShowDialog(); if (dr != DialogResult.OK) { return; } NewDDSParameters.Result result = parms.Value; ddsPanel1.ImageSize = new System.Drawing.Size(result.Width, result.Height); ddsPanel1.UseDXT = result.UseDXT; ddsPanel1.UseLuminance = result.UseLuminance; ddsPanel1.AlphaDepth = result.AlphaDepth; lbImageW.Text = ddsPanel1.ImageSize.Width + ""; lbImageH.Text = ddsPanel1.ImageSize.Height + ""; lbUseDXT.Text = ddsPanel1.UseDXT ? "Y" : "N"; lbAlphaDepth.Text = "" + ddsPanel1.AlphaDepth; tlpImageSize.Visible = true; }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { int width = ddsPanel1.MaskSize != Size.Empty ? ddsPanel1.MaskSize.Width : 1024; int height = ddsPanel1.MaskSize != Size.Empty ? ddsPanel1.MaskSize.Height : 1024; NewDDSParameters parms = new NewDDSParameters(width, height, true); DialogResult dr = parms.ShowDialog(); if (dr != DialogResult.OK) { return; } NewDDSParameters.Result result = parms.Value; ddsPanel1.CreateImage(result.Red, result.Green, result.Blue, result.Alpha, result.Width, result.Height, true); ddsPanel1.UseDXT = result.UseDXT; ddsPanel1.AlphaDepth = result.AlphaDepth; currentFilename = null; currentFilenameIsDds = null; updateDetails(); }