private void button2_Click(object sender, System.EventArgs e) { try { this.pictureBox1.Image = FrameGrabber.GetFrameFromVideo(this.textBox1.Text, 0.2d, new Size(200, 200)); } catch (JockerSoft.Media.InvalidVideoFileException ex) { MessageBox.Show(ex.Message, "Extraction failed"); } }
private void trackBar1_Scroll(object sender, System.EventArgs e) { try { this.pictureBox1.Image = FrameGrabber.GetFrameFromVideo(this.textBox1.Text, ((double)this.trackBar1.Value) / this.trackBar1.Maximum); } catch (JockerSoft.Media.InvalidVideoFileException ex) { MessageBox.Show(ex.Message, "Extraction failed"); } }
private void button4_Click(object sender, System.EventArgs e) { try { this.pictureBox1.Image = FrameGrabber.GetFrameFromVideo(this.textBox1.Text, 0.2d); } catch (JockerSoft.Media.InvalidVideoFileException ex) { MessageBox.Show(ex.Message, "Extraction failed"); } catch (StackOverflowException) { MessageBox.Show("The target image size is too big", "Extraction failed"); } }