
This code is more difficult for me to understand, but now I know some concept about this. At colored image, one pixel include three bytes (Blue, Green, Red). At gray image, one pixel include one byte. If we want to change color image's color to the same kind of colored, we have to change each pixel of each row, therefore, we have to use for-loop to get each pixel's site then change it.
沒有留言:
張貼留言