<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國際加速解決方案。 廣告
                ??? 作為第一篇文章,本人將介紹Instagram中Brannan 濾鏡的實現過程,當然,是自己的模擬而已,結果差異敬請諒解。 ??? 先看下效果圖: ![](https://box.kancloud.cn/2016-01-05_568b331abf78e.jpg) ![](https://box.kancloud.cn/2016-01-05_568b331af047b.jpg) 1 PS實現步驟: 1.1?打開測試圖像,復制圖層,命名為圖層a; 1.2?對圖層a進行去色操作,然后,打開色階-綠色-調整如下: ![](https://box.kancloud.cn/2016-01-05_568b331b1e775.jpg) 1.3對當前圖層a選擇圖層混合模式-濾色; 1.4新建圖層b,填充顏色RGB(36,1, 34),選擇圖層混合模式-柔光,不透明度60%: ![](https://box.kancloud.cn/2016-01-05_568b331b34e8d.jpg) 1.5新建圖層c,填充顏色RGB(253,253,241),選擇圖層混合模式-正片疊底: 1.6合并所有圖層,即可得到相應的效果圖了; 2,程序實現: ~~~ <span style="font-size:14px;">public static Bitmap DoGrayEffect(Bitmap srcBitmap, int pxMode) { Bitmap src = new Bitmap(srcBitmap); int w = src.Width; int h = src.Height; PixelFormat format = (pxMode == 0 ? PixelFormat.Format24bppRgb : PixelFormat.Format32bppArgb); BitmapData srcData = src.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, format); Desaturate((byte*)srcData.Scan0, w, h, srcData.Stride, pxMode); src.UnlockBits(srcData); return src; }</span> ~~~ ~~~ <span style="font-size:14px;"> //色階調整 public static Bitmap DoLevelAdjust(Bitmap srcBitmap, int DestChannel, int InputLeftLimit, int InputMiddle, int InputRightLimit, int OutputLeftLimit, int OutputRightLimit, int pxMode) { Bitmap src = new Bitmap(srcBitmap); int w = src.Width; int h = src.Height; PixelFormat format = (pxMode == 0 ? PixelFormat.Format24bppRgb : PixelFormat.Format32bppArgb); BitmapData srcData = src.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, format); LevelAdjust((byte*)srcData.Scan0, w, h, srcData.Stride, DestChannel, InputLeftLimit, InputMiddle, InputRightLimit, OutputLeftLimit, OutputRightLimit, pxMode); src.UnlockBits(srcData); return src; }</span> ~~~ ~~~ <span style="font-size:14px;">//圖層混合模式 public static Bitmap DoEffect(Bitmap srcBitmap, Bitmap mxBitmap, int pxMode, int effectMode) { Bitmap src = new Bitmap(srcBitmap); Bitmap mx = new Bitmap(mxBitmap); int w = src.Width; int h = src.Height; PixelFormat format = (pxMode == 0 ? PixelFormat.Format24bppRgb : PixelFormat.Format32bppArgb); BitmapData srcData = src.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, format); BitmapData mxData = mx.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, format); DoSpecialEffect((byte*)srcData.Scan0, (byte*)mxData.Scan0, w, h, srcData.Stride, pxMode, effectMode); src.UnlockBits(srcData); mx.UnlockBits(mxData); return src; } //單色圖層混合模式 public static Bitmap DoSingleColorEffect(Bitmap srcBitmap, int r, int g, int b, int pxMode, int effectMode) { Bitmap src = new Bitmap(srcBitmap); int w = src.Width; int h = src.Height; PixelFormat format = (pxMode == 0 ? PixelFormat.Format24bppRgb : PixelFormat.Format32bppArgb); BitmapData srcData = src.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, format); byte* p = (byte*)srcData.Scan0; int seg = (pxMode == 0 ? 3 : 4); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { DoPixelEffect(p, r, g, b, effectMode); } } src.UnlockBits(srcData); return src; }</span> ~~~ ~~~ <span style="font-size:14px;"> //Brannan 濾鏡 public static Bitmap BrannanFilter(Bitmap srcBitmap, int pxMode) { Bitmap temp = DoGrayEffect(srcBitmap, 0);//去色 Bitmap leBmp = DoLevelAdjust(temp, 2, 0, 128, 232, 0, 250, 0);//綠色色階調整 Bitmap filterBmp = DoEffect(srcBitmap, leBmp, 0, (int)EffectMode.MODE_FILTERCOLOR);//濾色 temp = DoSingleColorEffect(filterBmp, 22, 1, 20, 0, (int)EffectMode.MODE_SMOOTHLIGHT);//柔化 temp = DoSingleColorEffect(temp, 253, 253, 241, 0, (int)EffectMode.MODE_MULTIPLY);//正片疊底 return temp; }</span> ~~~ PSD文件及C代碼DEMO免費下載鏈接:[點擊打開鏈接](http://download.csdn.net/detail/trent1985/8055639) **最后,分享一個專業的圖像處理網站(微像素),里面有很多源代碼下載:** [http://www.zealpixel.com/portal.php](http://www.zealpixel.com/portal.php)
                  <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>

                              哎呀哎呀视频在线观看