Results 1 to 6 of 6

Thread: [RESOLVED] [2005] Image Overlay

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2007
    Location
    Kentucky, USA
    Posts
    82

    Resolved [RESOLVED] [2005] Image Overlay

    If I have two images and I want to overlay them. How would I do that?

    Example:

    Image 1:
    http://radar.weather.gov/ridge/Overl...Topo_Short.jpg

    Image 2:
    http://radar.weather.gov/ridge/Overl...ounty_Long.gif

    How would I take image 2 and overlay it over image 1?

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2005] Image Overlay

    Do it in photoshop maybe?... Just kidding Sorry I don't have the answer for you.

  3. #3
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: [2005] Image Overlay

    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2007
    Location
    Kentucky, USA
    Posts
    82

    Re: [2005] Image Overlay

    I'm not quite understanding the information in that link. That is dealing with the Form1_Paint event. I need this to happen outside of that event.

    I have a treeview control with a list of all the states and their radar id's.

    Here is the code.

    Code:
        Private Sub cmdRadar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRadar.Click
            Dim TopoString As String
            Dim CountyString As String
            Dim Request As HttpWebRequest
            Dim Response As WebResponse
            Dim str As IO.Stream
    
            lblStatus.Text = "Requesting Topo Image"
            StatusStrip1.Refresh()
            TopoString = "http://radar.weather.gov/ridge/Overlays/Topo/Short/" & GetRadarID(tvRadarID.SelectedNode.Text) & "_Topo_Short.jpg"
            Request = WebRequest.Create(TopoString)
            Response = Request.GetResponse()
            str = Response.GetResponseStream
            Dim Topo_Pic As New Bitmap(str)
            lblStatus.Text = "Topo Image Received"
            StatusStrip1.Refresh()
    
            lblStatus.Text = "Requesting County Image"
            StatusStrip1.Refresh()
            CountyString = "http://radar.weather.gov/ridge/Overlays/County/Long/" & GetRadarID(tvRadarID.SelectedNode.Text) & "_County_Long.gif"
            Request = WebRequest.Create(CountyString)
            Response = Request.GetResponse()
            str = Response.GetResponseStream
            Dim County_Pic As New Bitmap(str)
            lblStatus.Text = "County Image Received"
            StatusStrip1.Refresh()
    
            PictureBox1.Image = (Topo_Pic)
        End Sub
    
        Private Function GetRadarID(ByVal TreeViewNodeText As String)
            Try
                Dim tmpVar As Integer
                Dim ParsedID As String
                tmpVar = Strings.InStr(TreeViewNodeText, "-")
                ParsedID = Strings.Mid(TreeViewNodeText, 1, tmpVar - 2)
                Return ParsedID
            Catch ex As Exception
                Return 0
            End Try
        End Function
    When you click the button I need to to overlay the County Image on top of the Topo image...

  5. #5
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: [2005] Image Overlay

    This is going to be difficult since everytime you need to redraw the picture nothing will happen.
    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2007
    Location
    Kentucky, USA
    Posts
    82

    Re: [2005] Image Overlay

    There is no way to overlay the two images and then display them in a picturebox?

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