guys, I read the color code of the picture through imgo
:
height := imgo.GetImageHeight(img) // [height]
width := imgo.GetImageWidth(img) // [width]
imgMatrix := imgo.MustRead("F:\\GOPATH\\src\\code\\img\\hsq.jpg")
for starty := 0; starty < height; startyPP {
for startx := 0; startx < width; startxPP {
C := imgMatrix[starty][startx][0:3]
R := imgMatrix[starty][startx][0] // R
G := imgMatrix[starty][startx][1] // G
B := imgMatrix[starty][startx][2] // B
}
}
print out RCompGBank B and find that it is of uint8 type. I want to transfer it to int type and ask how to transfer it. Beginners ask for advice.