心得:今天教了改變圖片的RGB,以及在視訊裡面加入自己想要的圖片,
還蠻實用的,也很好玩。
code改成
for (int x=0; x<logoImg->width; x++) {
ptr2[3*(x+x1)]=alpha*ptr1[3*(x)] + (1-alpha)*ptr2[3*(x+x1)];
ptr2[3*(x+x1)+1]=alpha*ptr1[3*(x)+1] + (1-alpha)*ptr2[3*(x+x1)+1];
ptr2[3*(x+x1)+2]=alpha*ptr1[3*(x)+2] + (1-alpha)*ptr2[3*(x+x1)+2];
}
沒有留言:
張貼留言