Results 1 to 2 of 2

Thread: [RESOLVED] Draw Image From File on Video

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2019
    Posts
    66

    Resolved [RESOLVED] Draw Image From File on Video

    Hi Guys,

    I'm trying to overlay an image on a video stream. How can i resize and position my image on the video? So far, here is my code:

    Code:
    Private Sub CAPTURE(ByVal sender As Object, ByVal eventArgs As NewFrameEventArgs)
    
            
                                If ButtonVIDEO.BackColor = Color.Black Then 'IF YOU ARE NOT RECORDING ......
                                    BMP = DirectCast(eventArgs.Frame.Clone(), Bitmap) 'PUT THE DATA IN THE BITMAP
                                    PictureBox1.Image = DirectCast(eventArgs.Frame.Clone(), Bitmap) 'PRESENTS THEM AT THE PICTURE BOX
                                    
                                    Dim imagePath As String = "C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg"
                                    PictureBox1.Image = Image.FromFile(imagePath)
    
                                Else 'IF YOU ARE RECORDING ...
                                    BMP = DirectCast(eventArgs.Frame.Clone(), Bitmap)     'PUT THE DATA IN THE BITMAP
                                    PictureBox1.Image = DirectCast(eventArgs.Frame.Clone(), Bitmap)  'PRESENTS THEM AT THE PICTURE BOX
                                    ESCRITOR.WriteVideoFrame(PictureBox1.Image)  'KEEP THEM IN THE MEMORY
    
                                End If
    
                               
        End Sub
    Last edited by joko markono; Jan 22nd, 2020 at 02:57 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width