폴킴 (Paul Kim) -你都記得 You Remember

曾經有那樣深刻的感情,因為家裡反對和當時自己的懦弱 在那之後幾乎看到廟宇就許下:願把自己下半輩子的幸福都給你,只願你幸福喜樂 所以看到這段歌詞非常有感,年紀即將過40,所以真的得若無其事地活下去  네가 아주 행복했음 좋겠어 要是你過得幸福就好了 대신 내가 불행하면 좋겠어 要是換成我變得不幸就好了 기억나지 않았으면 좋겠어 如果什麼都不記得就好了 다시 돌아갈 수 있음 좋겠어 如果能夠再次回頭就好了 너의 찰나와 영원들이 願你所有的剎那和永恆 너만의 것이 되길 都變成專屬於你自己的時刻 사실 난 행복을 잘 몰라 但其實我真的不懂所謂的幸福是什麼 너는 아무렇지 않게 살아가야 하니까 因為你得若無其事地活下去

浮雕效果

出處:http://wenku.baidu.com/view/ff8ca107e87101f69e3195cc.html

原理: 對圖像像素點的像素值分別與相鄰像素點的像素值相減後加上128,

然後將其作為新的像素點的值.


private void button1_Click(object sender, EventArgs e)
  {
            //以浮雕效果顯示圖像           
 try {
     int Height = this.pictureBox1.Image.Height;
     int Width = this.pictureBox1.Image.Width;
     Bitmap newBitmap = new Bitmap(Width, Height);
     Bitmap oldBitmap = (Bitmap)this.pictureBox1.Image;

     Color pixel1, pixel2;

     for (int x = 0; x < Width - 1; x++)
     {
       for (int y = 0; y < Height - 1; y++) 
       {        

        int r = 0, g = 0, b = 0;
        pixel1 = oldBitmap.GetPixel(x, y);

        pixel2 = oldBitmap.GetPixel(x + 1, y + 1);
        r = Math.Abs​​(pixel1.R -​​ pixel2.R + 128);
        g = Math.Abs​​(pixel1.G - pixel2.G + 128);
        b = Math.Abs​​(pixel1.B - pixel2.B + 128);
   
     if (r > 255) r = 255;
    if (r < 0) r = 0;  if (g > 255) g = 255;
    if (g < 0) g = 0;  if (b > 255) b = 255; if (b < 0)

    b = 0; 
    newBitmap.SetPixel(x, y, Color.FromArgb(r, g, b));
}
} this.picResult.Image = newBitmap;
 }
 catch (Exception ex) {
MessageBox.Show(ex.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); }
        }
    }
}

留言

這個網誌中的熱門文章

C# 裡 List用法

"需要有物件參考才能使用非靜態欄位、方法或屬性"的問題排除

達因筆 & 表面能 原理