小编Ber*_*oop的帖子

java Vs VB.net中的RGB颜色

我不是母语为英语的人,所以请原谅任何翻译错误.

我真的没有编码问题.这更像是一个概念性问题.

我写了两次相同的代码片段,将图像转换为RGB值列表.(每个像素的3个值的1个组合).

我首先在VB.net中使用以下代码编写代码:

Dim bmp As New Bitmap(File)
For x As Integer = 0 To w - 1 
    For y As Integer = 0 To h - 1
        Dim c As Color = bmp.GetPixel(x, y)
        Dim Red as integer = c.R
        Dim Green as integer = c.G
        Dim Blue as integer = c.B
    Next y
next x
Run Code Online (Sandbox Code Playgroud)

之后我在Java中写了以下内容:

BufferedImage image = ImageIO.read(new File(File))
for (int i = 0; i < w; i++) {
    for (int j = 0; j …
Run Code Online (Sandbox Code Playgroud)

java vb.net rgb colors rgbcolor

7
推荐指数
1
解决办法
158
查看次数

标签 统计

colors ×1

java ×1

rgb ×1

rgbcolor ×1

vb.net ×1