I have a color png image which I read in R using the PNG package. Now to begin with I want to display this colored png image in grayscale. Then I want to convert this colored png image in grayscale format for further processing. Following is the code for reading and displaying the colored image that I have used –