|
-
Apr 16th, 2008, 01:24 PM
#1
Thread Starter
Lively Member
[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?
-
Apr 16th, 2008, 01:42 PM
#2
Re: [2005] Image Overlay
Do it in photoshop maybe?... Just kidding Sorry I don't have the answer for you.
-
Apr 16th, 2008, 01:52 PM
#3
Fanatic Member
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?
-
Apr 16th, 2008, 02:07 PM
#4
Thread Starter
Lively Member
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...
-
Apr 16th, 2008, 02:11 PM
#5
Fanatic Member
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?
-
Apr 16th, 2008, 02:18 PM
#6
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|