public void MyTestInitialize() { _stitcher = new ImageStitcher(); }
private void buttonStitch_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(textBoxImage1.Text) || string.IsNullOrWhiteSpace(textBoxImage2.Text) || string.IsNullOrWhiteSpace(textBoxOutPutImage.Text)) return; var imageFile1 = new FileInfo(textBoxImage1.Text); var imageFile2 = new FileInfo(textBoxImage2.Text); var outputFile = new FileInfo(textBoxOutPutImage.Text); if (imageFile1.Exists && imageFile2.Exists) { var stitcher = new ImageStitcher(imageFile1, imageFile2); stitcher.Border = new SolidBorder(2, Color.Purple) { Inside = false }; var outputImage = stitcher.DoStitch(); var jpegSaver = new JpegSaver {ImageQuality = 85}; jpegSaver.Save(outputImage, outputFile); } }