private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("图片1不能为空"); return; } if (textBox2.Text == "") { MessageBox.Show("保存文件不能为空"); return; } if (textBox3.Text == "") { var generator = new VTFGenerator(textBox1.Text, textBox2.Text); generator.ProcessProgress += process_process; generator.ProcessingComplete += process_comlete; generator.Process(checkBox1.Checked); } else { var generator = new VTFGenerator(textBox1.Text, textBox3.Text, textBox2.Text); generator.ProcessProgress += process_process; generator.ProcessingComplete += process_comlete; generator.Process(checkBox1.Checked); } }
public void Animation_NoFading_Alpha_Stripes() { const string testInputFile = @"TestInputs\256_stripe_animated.gif"; const string actualOutputFile = @"ActualOutputs\256_alpha_stripe_animated.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void StaticImage_NoFading_Alpha_Stripes() { const string testInputFile = @"TestInputs\256_test_stripes.png"; const string actualOutputFile = @"ActualOutputs\256_alpha_stripes.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void StaticImage_NoFading_Alpha() { const string testInputFile = @"TestInputs\256_Static_NoAlpha.jpg"; const string actualOutputFile = @"ActualOutputs\256_Static_Alpha.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(true); }
public void WeirdSize() { const string testInputFile = @"TestInputs\510x510.gif"; const string actualOutputFile = @"ActualOutputs\weirdsize.vtf"; VTFGenerator generator = new VTFGenerator(testInputFile, actualOutputFile); generator.Process(false); }
public void StaticImage_Fading_NoAlpha() { const string smallInputFile = @"TestInputs\256_Static_NoAlpha.jpg"; const string bigInputFile = @"TestInputs\256_test_stripes.png"; const string actualOutputFile = @"ActualOutputs\256_Static_Fading_NoAlpha.vtf"; VTFGenerator generator = new VTFGenerator(smallInputFile, bigInputFile, actualOutputFile); generator.Process(false); }
private void wb_Static_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { MemoryStream outputStream = new MemoryStream(); VTFGenerator g = new VTFGenerator(e.Result, outputStream); //g.Process(true); g.ProcessProgress += g_Static_ProcessProgress; g.ProcessingComplete += g_Static_ProcessingComplete; g.Process_Async(_transparency); }
private void CheckDownloadsComplete() { if (_nearStream != null && _farStream != null) { MemoryStream outputStream = new MemoryStream(); VTFGenerator g = new VTFGenerator(_farStream, _nearStream, outputStream); g.ProcessProgress += g_Static_ProcessProgress; g.ProcessingComplete += g_Fading_ProcessingComplete; g.Process_Async(_transparency); } }