vb.net怎么使图像灰度化再输出

vb.net怎么使图像灰度化再输出,第1张

在web上可以使用HTML5的特效实现。

在windows forms里面可以直接修改设置图片的属性。

Try

' 图片位置初始化一个image1

Dim image1 As 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

学好一门语言,没有过时之说。就看你精不精。

VB缺点就是只能开发Windows平台的软件。

VB6是有点老了,但我用了多年,开发软件得心应手,一点不差于其它自命清高的某些人用的其它语言。再说了,VB也有对应的vb.net,它是和JAVA同一代的语言,只要微软的visual studio不过时VB.net就不过时。.Net和JAVA具有很多共同特点。

Java主要是因为现在android移动系统可以用它来开发应用程序,所以又更加流行了。近几年肯定是不容易没落的编程语言。学习难度其实和VB差不了多少。

如果想开发手机应用、平板电脑应用,建议学java和html5.


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/7053590.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-01
下一篇2023-04-01

发表评论

登录后才能评论

评论列表(0条)

    保存