what i'm trying to do is i have an image which has different blocks to show plots in a housing society, since the file is an image i don't have fields builtin to do this.
(我正在尝试做的是,我有一个图像,该图像具有不同的块来显示房屋社会的地块,因为文件是图像,我没有内置字段来执行此操作。)
At first i thought of maybe adding fields to the blocks but that was shot down as the image file is really big and i have to zoom in to the image which means the fields must change too. (起初,我想到可能会在块中添加字段,但是由于图像文件很大而被击落,因此我必须放大图像,这意味着字段也必须更改。)
Now what i'm trying to do this by fixing each block with an RGB color and finding that color by searching through all the pixels. (现在,我正在尝试通过用RGB颜色固定每个块并通过搜索所有像素来找到该颜色来实现此目的。)
now this works and i can find the pixels but i want to be able to zoom to that particular block, how can i do this? (现在这可以工作,我可以找到像素,但是我希望能够缩放到特定的块,我该怎么做?)
Following is the code i use to loop through the whole bmp image. (以下是我用来遍历整个bmp图像的代码。)
For i = 0 To img.Width - 1
For j = 0 To img.Height - 1
Dim col = img.GetPixel(i, j)
If (col.R = 100 And col.G = 1 And col.B = 2) Then
img.SetPixel(i, j, Color.Black)
End If
Next
Next
Return img
ask by raza translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…