VB.Net中如何将程序中生成的Bitmap对象在电脑中保存成一张图片?
4个回答
展开全部
多个路由器设置方法:
方法一、设置2级路由。
一、两台路由器连接方法
1、有电信猫:电信猫----路由器1wan口;路由器1lan口----路由器2wan口;路由器2lan口----电脑。
2、没有电信猫:网线----路由器1wan口;路由器1lan口----路由器2wan口;路由器2lan口----电脑。
二、设置方法
设置前,请断开这台路由器2wan口网线,等设置完成后在插上。
1、设置第2台路由器ip段。
①、lan口设置,如果你有多个路由器,而且是第二台路由器,为了避免冲突(路由器1lan口IP:192.168.1.1),可以将此IP改为其它。比如修改为:192.168.2.1
在重启路由器,进入路由器的地址是:192.168.2.1了。
2、设置第二台路由器上网方法。
①、查看第1台路由器下连接的电脑的ip详细信息。(win+r--输入,cmd--输入:ipconfig /all [记住:ip,掩码,网关,dns])
②、在第2台路由器上设置,在【设置向导】选择【静态ip】。输入第1台路由器不用的ip,其他的:掩码,网关,dns设置一样。
③、设置好后重启路由器。
方法二、路由器b做交换机使用。
1、路由器a正常设置。
2、路由器b设置方法:
①、首先要空出wan口,所有的接线都接在lan口上。
②、关闭路由b的dhcp服务。
③、修改路由b的lan口ip地址(不要与路由器a的网段相同即可),修改IP为192.168.2.1。
方法一、设置2级路由。
一、两台路由器连接方法
1、有电信猫:电信猫----路由器1wan口;路由器1lan口----路由器2wan口;路由器2lan口----电脑。
2、没有电信猫:网线----路由器1wan口;路由器1lan口----路由器2wan口;路由器2lan口----电脑。
二、设置方法
设置前,请断开这台路由器2wan口网线,等设置完成后在插上。
1、设置第2台路由器ip段。
①、lan口设置,如果你有多个路由器,而且是第二台路由器,为了避免冲突(路由器1lan口IP:192.168.1.1),可以将此IP改为其它。比如修改为:192.168.2.1
在重启路由器,进入路由器的地址是:192.168.2.1了。
2、设置第二台路由器上网方法。
①、查看第1台路由器下连接的电脑的ip详细信息。(win+r--输入,cmd--输入:ipconfig /all [记住:ip,掩码,网关,dns])
②、在第2台路由器上设置,在【设置向导】选择【静态ip】。输入第1台路由器不用的ip,其他的:掩码,网关,dns设置一样。
③、设置好后重启路由器。
方法二、路由器b做交换机使用。
1、路由器a正常设置。
2、路由器b设置方法:
①、首先要空出wan口,所有的接线都接在lan口上。
②、关闭路由b的dhcp服务。
③、修改路由b的lan口ip地址(不要与路由器a的网段相同即可),修改IP为192.168.2.1。
展开全部
Dim image1 As Bitmap
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Try
' Retrieve the image.
image1 = New Bitmap( _
"C:\Documents and Settings\All Users\Documents\My Music\music.bmp", _
True)
Dim x, y As Integer
' Loop through the images pixels to reset color.
For x = 0 To image1.Width - 1
For y = 0 To image1.Height - 1
Dim pixelColor As Color = image1.GetPixel(x, y)
Dim newColor As Color = _
Color.FromArgb(pixelColor.R, 0, 0)
image1.SetPixel(x, y, newColor)
Next
Next
' Set the PictureBox to display the image.
PictureBox1.Image = image1
' Display the pixel format in Label1.
Label1.Text = "Pixel format: " + image1.PixelFormat.ToString()
Catch ex As ArgumentException
MessageBox.Show("There was an error." _
& "Check the path to the image file.")
End Try
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button5.Click
Try
If Not (image1 Is Nothing) Then
image1.Save("c:\myBitmap.bmp")
Button5.Text = "Saved file."
End If
Catch ex As Exception
MessageBox.Show("There was a problem saving the file." _
& "Check the file permissions.")
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Try
' Retrieve the image.
image1 = New Bitmap( _
"C:\Documents and Settings\All Users\Documents\My Music\music.bmp", _
True)
Dim x, y As Integer
' Loop through the images pixels to reset color.
For x = 0 To image1.Width - 1
For y = 0 To image1.Height - 1
Dim pixelColor As Color = image1.GetPixel(x, y)
Dim newColor As Color = _
Color.FromArgb(pixelColor.R, 0, 0)
image1.SetPixel(x, y, newColor)
Next
Next
' Set the PictureBox to display the image.
PictureBox1.Image = image1
' Display the pixel format in Label1.
Label1.Text = "Pixel format: " + image1.PixelFormat.ToString()
Catch ex As ArgumentException
MessageBox.Show("There was an error." _
& "Check the path to the image file.")
End Try
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button5.Click
Try
If Not (image1 Is Nothing) Then
image1.Save("c:\myBitmap.bmp")
Button5.Text = "Saved file."
End If
Catch ex As Exception
MessageBox.Show("There was a problem saving the file." _
& "Check the file permissions.")
End Try
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pic As New Bitmap = '程序中生成的bitmap
pic.Save("保存路径")
End Sub
Dim pic As New Bitmap = '程序中生成的bitmap
pic.Save("保存路径")
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim image1 As Bitmap
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Try
' Retrieve the image.
image1 = New Bitmap( _
"C:\Documents and Settings\All Users\Documents\My Music\music.bmp", _
True)
Dim x, y As Integer
' Loop through the images pixels to reset color.
For x = 0 To image1.Width - 1
For y = 0 To image1.Height - 1
Dim pixelColor As Color = image1.GetPixel(x, y)
Dim newColor As Color = _
Color.FromArgb(pixelColor.R, 0, 0)
image1.SetPixel(x, y, newColor)
Next
Next
' Set the PictureBox to display the image.
PictureBox1.Image = image1
' Display the pixel format in Label1.
Label1.Text = "Pixel format: " + image1.PixelFormat.ToString()
Catch ex As ArgumentException
MessageBox.Show("There was an error." _
& "Check the path to the image file.")
End Try
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button5.Click
Try
If Not (image1 Is Nothing) Then
image1.Save("c:\myBitmap.bmp")
Button5.Text = "Saved file."
End If
Catch ex As Exception
MessageBox.Show("There was a problem saving the file." _
& "Check the file permissions.")
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Try
' Retrieve the image.
image1 = New Bitmap( _
"C:\Documents and Settings\All Users\Documents\My Music\music.bmp", _
True)
Dim x, y As Integer
' Loop through the images pixels to reset color.
For x = 0 To image1.Width - 1
For y = 0 To image1.Height - 1
Dim pixelColor As Color = image1.GetPixel(x, y)
Dim newColor As Color = _
Color.FromArgb(pixelColor.R, 0, 0)
image1.SetPixel(x, y, newColor)
Next
Next
' Set the PictureBox to display the image.
PictureBox1.Image = image1
' Display the pixel format in Label1.
Label1.Text = "Pixel format: " + image1.PixelFormat.ToString()
Catch ex As ArgumentException
MessageBox.Show("There was an error." _
& "Check the path to the image file.")
End Try
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button5.Click
Try
If Not (image1 Is Nothing) Then
image1.Save("c:\myBitmap.bmp")
Button5.Text = "Saved file."
End If
Catch ex As Exception
MessageBox.Show("There was a problem saving the file." _
& "Check the file permissions.")
End Try
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询