這次的視訊為黑白轉換及色調轉換
因為一個pixel裡面存了三個值,分別為光的三原色
我們留下其中一個值,再把其他兩個值設為0
就會得到只有那個顏色的圖片

像是加入圖片在影像中時for (int x=0; xwidth; x++) { ptr2[3*(x+x1)]=alpha*ptr1[3*(x+x1)] + (1-alpha)*ptr2[3*(x+x1)]; ptr2[3*(x+x1)+1]=alpha*ptr1[3*(x+x1)+1] + (1-alpha)*ptr2[3*(x+x1)+1]; ptr2[3*(x+x1)+2]=alpha*ptr1[3*(x+x1)+2] + (1-alpha)*ptr2[3*(x+x1)+2]; } 應該改為
