i want to save the Gray prediction image before encode it to color , how can i modify the code to save gray image , thanks