<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                本文介紹暗調濾鏡的實現過程,這個濾鏡主要是呈現一種暗調,對比度明顯的效果,原理很簡單,公式如下: newR = R*R/255; newG = G*G/255; newB = B*B/255; 實現代碼如下: ~~~ private Bitmap FilterProcess(Bitmap a) { Bitmap srcBitmap = new Bitmap(a); int w = srcBitmap.Width; int h = srcBitmap.Height; System.Drawing.Imaging.BitmapData srcData = srcBitmap.LockBits(new Rectangle(0, 0, w, h), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format32bppArgb); byte* pSrc = (byte*)srcData.Scan0; int offset = srcData.Stride - w * 4; int r, g, b; for (int j = 0; j < h; j++) { for (int i = 0; i < w; i++) { b = pSrc[0]; g = pSrc[1]; r = pSrc[2]; pSrc[2] = (byte)(r * r / 255); pSrc[1] = (byte)(g * g / 255); pSrc[0] = (byte)(b * b / 255); pSrc += 4; } pSrc += offset; } srcBitmap.UnlockBits(srcData); return srcBitmap; } ~~~ 效果如下: ![](https://box.kancloud.cn/2016-01-05_568b3321563f6.png) 原圖 [![](https://box.kancloud.cn/2016-01-05_568b33218f01f.png)](http://www.zealpixel.com/data/attachment/portal/201508/16/104643w1swwr11iz7fdf8r.png) 暗調效果圖 最后,放上一個完整的C#/C程序DEMO下載鏈接:[http://www.zealpixel.com/forum.php?mod=viewthread&tid=79&extra=page%3D1](http://www.zealpixel.com/forum.php?mod=viewthread&tid=79&extra=page%3D1)
                  <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>

                              哎呀哎呀视频在线观看