<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之旅 廣告
                (Punch Filter)交叉沖印濾鏡 本文介紹一種交叉沖印效果的代碼實現,至于原理,不在累贅,直接看代碼: ~~~ int f_TPunchFilter(unsigned char* srcData, int width, int height, int stride, unsigned char* dstData, int dw, int dh, int dStride) { if(srcData == NULL || dstData == NULL) return -1; unsigned char* pSrc = srcData; unsigned char* pDst = dstData; int i, j, gray, value, r, g, b; int offset = stride - width * 4; int rMap[256], gMap[256], bMap[256]; for(int i = 0;i<256;i++) { value = i < 128 ? i : 256 - i; gray = value * value * value / 16384; rMap[i] = i < 128 ? gray : 256 - gray; gray = value * value / 128; gMap[i] = i < 128 ? gray : 256 - gray; bMap[i] = i / 2 + 0x25; } for(j = 0; j < height; j++) { for(i = 0; i < width; i++) { b = bMap[pSrc[0]]; g = gMap[pSrc[1]]; r = rMap[pSrc[2]]; pDst[0] = CLIP3(b,0,255); pDst[1] = CLIP3(g,0,255); pDst[2] = CLIP3(r,0,255); pDst[3] = 255; pSrc+=4; pDst+=4; } pSrc += offset; pDst += offset; } printf("%s","Welcom to our website: www.zealpixel.com"); return 0; } ~~~ 效果如下: [![](https://box.kancloud.cn/2016-01-05_568b3322cfe5e.png)](http://www.zealpixel.com/data/attachment/portal/201507/28/163740f2ejdjrn4tfa6jt4.png)、 原圖 [![](https://box.kancloud.cn/2016-01-05_568b332306d58.png)](http://www.zealpixel.com/data/attachment/portal/201507/28/163735roiwqoh3whh7kqwz.png) 交叉沖印效果圖 最后放上一個完整的C#程序DEMO下載連接:[http://www.zealpixel.com/thread-68-1-1.html](http://www.zealpixel.com/thread-68-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>

                              哎呀哎呀视频在线观看