數位浮水印,是指將特定的資訊嵌入數位訊號中,數位訊號可能是音訊、圖片或是視訊等。若要拷貝有數位浮水印的訊號,所嵌入的資訊也會一併被拷貝。數位浮水印可分為浮現式和隱藏式兩種,前者是可被看見的浮水印(visible watermarking),其所包含的資訊可在觀看圖片或視訊時同時被看見。一般來說,浮現式的浮水印通常包含版權擁有者的名稱或標誌。
實作方式:
- Replacing a specific color in a bitmap to achieve transparency
- Changing the opacity of an image through a 5x5 ColorMatrix
float[][] colorMatrixElements = {
new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.3f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}
};
改變其中 3rd row 3rd column 的 0.3f 即可得到不同的透明度
Origin Picture
Logo
Result
Reference :
http://www.codeproject.com/Articles/2927/Creating-a-Watermarked-Photograph-with-GDI-for-NET
沒有留言:
張貼留言