<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                Wave Filter水波濾鏡 水波濾鏡是通過坐標變換來模擬水波效果,使圖像呈現出水波的特效。這個濾鏡有一個可調參數:水波的扭曲程度。 代碼如下; ~~~ /// Wave Filter /// /// Source image. /// The degree of wave,0-100. /// The result image. private Bitmap WaveFilterProcess(Bitmap srcBitmap, int degree) { Bitmap a = new Bitmap(srcBitmap); int w = a.Width; int h = a.Height; degree = degree * 32 / 100; degree = Math.Max(0, Math.Min(32, degree)); Bitmap dst = new Bitmap(w, h); System.Drawing.Imaging.BitmapData srcData = a.LockBits(new Rectangle(0, 0, w, h), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb); System.Drawing.Imaging.BitmapData dstData = dst.LockBits(new Rectangle(0, 0, w, h), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb); unsafe { byte* pIn = (byte*)srcData.Scan0.ToPointer(); byte* pOut = (byte*)dstData.Scan0.ToPointer(); byte* p = null; int stride = srcData.Stride - w * 4; int newX = 0, newY = 0; double PI2 = Math.PI * 2.0; for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { newX = (int)(degree * Math.Sin(PI2 * y / 128.0)) + x; newY = (int)(degree * Math.Cos(PI2 * x / 128.0)) + y; newX = Math.Min(w - 1, Math.Max(0, newX)); newY = Math.Min(h - 1, Math.Max(0, newY)); p = pIn + newY * srcData.Stride + newX * 4; pOut[0] = (byte)p[0]; pOut[1] = (byte)p[1]; pOut[2] = (byte)p[2]; pOut[3] = (byte)255; pOut += 4; } pOut += stride; } a.UnlockBits(srcData); dst.UnlockBits(dstData); } return dst; } ~~~ 效果圖如下: [![](https://box.kancloud.cn/2016-01-05_568b332613ebc.jpg)](http://www.zealpixel.com/data/attachment/portal/201507/22/180109cnnki2ihzwsbo08b.jpg) 原圖 [![](https://box.kancloud.cn/2016-01-05_568b33262decc.png)](http://www.zealpixel.com/data/attachment/portal/201507/22/180108r10lxojc94k8l4cc.png) 水波濾鏡效果圖 最后放上一個完整的C#版程序Demo下載地址:http://www.zealpixel.com/thread-59-1-1.html
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看