pixel art之 hqx 演算法

来源:http://www.cnblogs.com/tntmonks/archive/2016/08/16/5777753.html
-Advertisement-
Play Games

在去年的時候,偶然看到hqx演算法。 一個高質量的插值放大演算法。 與雙線性插值等插值演算法相比,這個演算法放大後對人眼保護相對比較好。 沒有雙線性插值看起來模糊,固然,也抽空把演算法簡單優化了一下。 官網及代碼: https://web.archive.org/web/20131205091805/http ...


在去年的時候,偶然看到hqx演算法。

一個高質量的插值放大演算法。

與雙線性插值等插值演算法相比,這個演算法放大後對人眼保護相對比較好。

沒有雙線性插值看起來模糊,固然,也抽空把演算法簡單優化了一下。

官網及代碼:

https://web.archive.org/web/20131205091805/http://www.hiend3d.com/hq2x.html

https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hqx/hqx-1.1.tar.gz

維基百科:

https://en.wikipedia.org/wiki/Hqx

不夠這個演算法寫得賊噁心,並不適用於學習。

貼上維基百科上的demo效果對比圖。

         博主只是簡單地把其中的放大兩倍的演算法,優化了一下,極大地提升演算法的速度。 廢話不多說,貼上代碼:
/*
//(c1*3+c2) >> 2;
#define Interp1(c1, c2) Interpolate_2(c1, c2, 3, 1, 2);
//(c1*2+c2+c3) >> 2; 
#define Interp2(c1, c2, c3) Interpolate_3(c1, c2, c3, 2, 1, 1, 2);
//(c1*7+c2)/8;
#define Interp3(c1, c2) Interpolate_2(c1, c2, 7, 1, 3);
//(c1*2+(c2+c3)*7)/16;
#define Interp4(c1, c2, c3) Interpolate_3(c1, c2, c3, 2, 7, 7, 4);
//(c1+c2) >> 1;
#define Interp5(c1, c2) Interpolate_2(c1, c2, 1, 1, 1);
//(c1*5+c2*2+c3)/8;
#define Interp6(c1, c2, c3) Interpolate_3(c1, c2, c3, 5, 2, 1, 3);
//(c1*6+c2+c3)/8;
#define Interp7(c1, c2, c3) Interpolate_3(c1, c2, c3, 6, 1, 1, 3);
//(c1*5+c2*3)/8;
#define Interp8(c1, c2) Interpolate_2(c1, c2, 5, 3, 3);
//(c1*2+(c2+c3)*3)/8;
#define Interp9(c1, c2, c3) Interpolate_3(c1, c2, c3, 2, 3, 3, 3);
//(c1*14+c2+c3)/16;
#define Interp10(c1, c2, c3) Interpolate_3(c1, c2, c3, 14, 1, 1, 4);
*/

#define MASK_2     0x0000FF00
#define MASK_13    0x00FF00FF 
#define MASK_ALPHA 0xFF000000


#define    rgb_to_y( c)   ((19595 * RED((c)) + 38470 * GREEN((c)) + 7471 * BLUE((c))) >> 16)


/* Interpolate functions */
 unsigned int Interpolate_2(unsigned int &c1, unsigned int &c2, int w1, int w2, int shift)
{
    if (c1 == c2) {
        return c1;
    }
    return
        (((((c1 & MASK_ALPHA) >> 24) * w1 + ((c2 & MASK_ALPHA) >> 24) * w2) << (24 - shift)) & MASK_ALPHA) +
        ((((c1 & MASK_2) * w1 + (c2 & MASK_2) * w2) >> shift) & MASK_2) +
        ((((c1 & MASK_13) * w1 + (c2 & MASK_13) * w2) >> shift) & MASK_13);
}
 unsigned int Interpolate_3(unsigned int &c1, unsigned int &c2, unsigned int &c3, int w1, int w2, int w3, int shift)
{
    return
        (((((c1 & MASK_ALPHA) >> 24) * w1 + ((c2 & MASK_ALPHA) >> 24) * w2 + ((c3 & MASK_ALPHA) >> 24) * w3) << (24 - shift)) & MASK_ALPHA) +
        ((((c1 & MASK_2) * w1 + (c2 & MASK_2) * w2 + (c3 & MASK_2) * w3) >> shift) & MASK_2) +
        ((((c1 & MASK_13) * w1 + (c2 & MASK_13) * w2 + (c3 & MASK_13) * w3) >> shift) & MASK_13);
}


void   hq2x_32(unsigned int *input, unsigned int *output, int Width, int Height, int Stride)
{
    int Channels = Stride / Width;
    if (Channels != 4) return;  
    unsigned int pixel[10]; 
    unsigned int gray[10]; 
    int step = 2;
    unsigned int dstStride = (Width * step)*Channels;
    int    dstWidth = (unsigned int)((Width * step)); 
    for (int y = 0; y < Height; ++y)
    {
        int    prevline = 0;
        int    nextline = 0;
        if (y > 0)
            prevline = -Width;
        if (y < Height - 1)
            nextline = Width;
        unsigned int* srcRowPtr = input + y*Width;
        unsigned int* dstRowPtr = output + (y<<1)*dstWidth;
        for (int x = 0; x < Width; ++x)
        {
            unsigned int&    pixel5 = pixel[5];
            unsigned int&    pixel2 = pixel[2];
            unsigned int&    pixel8 = pixel[8];
            unsigned int&    pixel1 = pixel[1];
            unsigned int&    pixel4 = pixel[4];
            unsigned int&    pixel7 = pixel[7];
            unsigned int&    pixel3 = pixel[3];
            unsigned int&    pixel6 = pixel[6];
            unsigned int&    pixel9 = pixel[9];
            unsigned int&    gray5 = gray[5];
            unsigned int&    gray2 = gray[2];
            unsigned int&    gray8 = gray[8];
            unsigned int&    gray1 = gray[1];
            unsigned int&    gray4 = gray[4];
            unsigned int&    gray7 = gray[7];
            unsigned int&    gray3 = gray[3];
            unsigned int&    gray6 = gray[6];
            unsigned int&    gray9 = gray[9];
            pixel2 = srcRowPtr[prevline];
            pixel5 = srcRowPtr[0];
            pixel8 = srcRowPtr[nextline];
            if (x <= 0)
            {
                pixel1 = pixel2;
                pixel4 = pixel5;
                pixel7 = pixel8;
            }
            else
            {
                pixel1 = srcRowPtr[prevline - 1];
                pixel4 = srcRowPtr[-1];
                pixel7 = srcRowPtr[nextline - 1];
            }
            if (x >= Width - 1)
            {
                pixel3 = pixel2;
                pixel6 = pixel5;
                pixel9 = pixel8;
            }
            else
            {
                pixel3 = srcRowPtr[prevline + 1];
                pixel6 = srcRowPtr[1];
                pixel9 = srcRowPtr[nextline + 1];
            }
            int    pattern = 0;
            int flag = 1;
            for (int k = 1; k <= 9; ++k)
            {
                gray[k] = (7471 * ((pixel[k] >> 16) & 0xFF) + 38470 * ((pixel[k] >> 8) & 0xFF) + 19595 * (pixel[k] & 0xFF)) >> 16; 
            }
            for (int i = 1; i <= 9; ++i)
            {
                if (i != 5)
                {
                    if (pixel[i] != pixel5)
                        pattern |= flag;
                    flag *= 2;
                }
            }
            unsigned int *    dstCurLine = &dstRowPtr[dstWidth];
            unsigned int *    dstCurLineNextPixel = &dstRowPtr[dstWidth + 1];

            switch (pattern)
            {
            case 0:
            case 1:
            case 4:
            case 5:
            case 32:
            case 33:
            case 36:
            case 37:
            case 128:
            case 129:
            case 132:
            case 133:
            case 160:
            case 161:
            case 164:
            case 165:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 2:
            case 34:
            case 130:
            case 162:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 16:
            case 17:
            case 48:
            case 49:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 64:
            case 65:
            case 68:
            case 69:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 8:
            case 12:
            case 136:
            case 140:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 3:
            case 35:
            case 131:
            case 163:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 6:
            case 38:
            case 134:
            case 166:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 20:
            case 21:
            case 52:
            case 53:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 144:
            case 145:
            case 176:
            case 177:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 192:
            case 193:
            case 196:
            case 197:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 96:
            case 97:
            case 100:
            case 101:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 40:
            case 44:
            case 168:
            case 172:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 9:
            case 13:
            case 137:
            case 141:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 18:
            case 50:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 80:
            case 81:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 72:
            case 76:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 10:
            case 138:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 66:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 24:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 7:
            case 39:
            case 135:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 148:
            case 149:
            case 180:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 224:
            case 225:
            case 228:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 41:
            case 45:
            case 169:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 22:
            case 54:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 208:
            case 209:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 104:
            case 108:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 11:
            case 139:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 19:
            case 51:
                if (gray2 == gray6)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel2, pixel4, 5, 2, 1, 3);
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 146:
            case 178:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                {
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 3, 3, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                break;
            case 84:
            case 85:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                if (gray6 == gray8)
                {
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel6, pixel2, 5, 2, 1, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                break;
            case 112:
            case 113:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray6 == gray8)
                {
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 5, 2, 1, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 3, 3, 3);
                }
                else
                {
                    dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                }
                break;
            case 200:
            case 204:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                {
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 3, 3, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel8, pixel6, 5, 2, 1, 3);
                }
                else
                {
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                }
                break;
            case 73:
            case 77:
                if (gray8 == gray4)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 5, 2, 1, 3);
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                }
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 42:
            case 170:
                if (gray4 == gray2)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 3, 3, 3);
                    dstCurLine[0] = Interpolate_3(pixel5, pixel4, pixel8, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                    dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                }
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 14:
            case 142:
                if (gray4 == gray2)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 3, 3, 3);
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 67:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 70:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 28:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 152:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 194:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 98:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 56:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 25:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 26:
            case 31:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 82:
            case 214:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 88:
            case 248:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 74:
            case 107:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 27:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 86:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 216:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 106:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 30:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 210:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 120:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 75:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 29:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 198:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 184:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 99:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 57:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 71:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 156:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 226:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 60:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 195:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 102:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 153:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 58:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 83:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 92:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 202:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 78:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 154:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 114:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 89:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 90:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 23:
            case 55:
                if (gray2 == gray6)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel2, pixel4, 5, 2, 1, 3);
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                    dstRowPtr[1] = pixel5;
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 150:
            case 182:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                {
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 3, 3, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[1] = pixel5;
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                break;
            case 212:
            case 213:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                if (gray6 == gray8)
                {
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel6, pixel2, 5, 2, 1, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                    dstCurLineNextPixel [0] = pixel5;
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                break;
            case 240:
            case 241:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray6 == gray8)
                {
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 5, 2, 1, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 3, 3, 3);
                }
                else
                {
                    dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                    dstCurLineNextPixel [0] = pixel5;
                }
                break;
            case 232:
            case 236:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                {
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 3, 3, 3);
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel8, pixel6, 5, 2, 1, 3);
                }
                else
                {
                    dstCurLine[0] = pixel5;
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                }
                break;
            case 105:
            case 109:
                if (gray8 == gray4)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 5, 2, 1, 3);
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 3, 3, 3);
                }
                else
                {
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                    dstCurLine[0] = pixel5;
                }
                dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 43:
            case 171:
                if (gray4 == gray2)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 3, 3, 3);
                    dstCurLine[0] = Interpolate_3(pixel5, pixel4, pixel8, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[0] = pixel5;
                    dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                }
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 15:
            case 143:
                if (gray4 == gray2)
                {
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 3, 3, 3);
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 5, 2, 1, 3);
                }
                else
                {
                    dstRowPtr[0] = pixel5;
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                }
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                break;
            case 124:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 203:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 62:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 211:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 118:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 217:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 110:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 155:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 188:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 185:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 61:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 157:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 103:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 227:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 230:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 199:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 220:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel2, 2, 1, 1, 2);
                dstRowPtr[1] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 158:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel8, 2, 1, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                break;
            case 234:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel6, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                break;
            case 242:
                dstRowPtr[0] = Interpolate_3(pixel5, pixel1, pixel4, 2, 1, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 2, 1, 1, 2);
                else
                    dstCurLineNextPixel [0] = pixel5;
                break;
            case 59:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                dstCurLine[0] = Interpolate_2(pixel5, pixel8, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel8, 2, 1, 1, 2);
                break;
            case 121:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel2, 3, 1, 2);
                dstRowPtr[1] = Interpolate_3(pixel5, pixel3, pixel2, 2, 1, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 87:
                dstRowPtr[0] = Interpolate_2(pixel5, pixel4, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                dstCurLine[0] = Interpolate_3(pixel5, pixel7, pixel4, 2, 1, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 79:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 2, 1, 1, 2);
                else
                    dstRowPtr[0] = pixel5;
                dstRowPtr[1] = Interpolate_2(pixel5, pixel6, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel9, pixel6, 2, 1, 1, 2);
                break;
            case 122:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRowPtr[1] = Interpolate_2(pixel5, pixel3, 3, 1, 2);
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 2, 1, 1, 2);
                else
                    dstCurLine[0] = pixel5;
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 94:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 2, 1, 1, 2);
                else
                    dstRowPtr[1] = pixel5;
                if (gray8 == gray4)
                    dstCurLine[0] = Interpolate_3(pixel5, pixel8, pixel4, 6, 1, 1, 3);
                else
                    dstCurLine[0] = Interpolate_2(pixel5, pixel7, 3, 1, 2);
                if (gray6 == gray8)
                    dstCurLineNextPixel [0] = Interpolate_3(pixel5, pixel6, pixel8, 6, 1, 1, 3);
                else
                    dstCurLineNextPixel [0] = Interpolate_2(pixel5, pixel9, 3, 1, 2);
                break;
            case 218:
                if (gray4 == gray2)
                    dstRowPtr[0] = Interpolate_3(pixel5, pixel4, pixel2, 6, 1, 1, 3);
                else
                    dstRowPtr[0] = Interpolate_2(pixel5, pixel1, 3, 1, 2);
                if (gray2 == gray6)
                    dstRowPtr[1] = Interpolate_3(pixel5, pixel2, pixel6, 6, 1, 1, 3);
                else
                    dstRow

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 彙總各路大神寫得ggplot2包文章!http://docs.ggplot2.org/current/ ...
  • 十一、函數 Python中函數以def定義,用於實現某種功能,若是某段代碼被多處使用,不妨將它定義成一個函數,或是它用於實現特定的功能,也可以將它定義成一個函數; 一個函數func(),func為函數名,是這個函數引用(指向函數的地址);而加上括弧func()則表示執行這個函數; 在函數中定義的變數 ...
  • 我的SimpleLoader裡面的一塊 https://github.com/taoshihan1991/simpleloader 效果: ...
  • 程式說明 這是一個十分可靠的程式,這個程式的查錯能力非常強悍。程式包含了文件操作,歸併排序和字元串輸入等多種技術。 程式的功能是從外部讀取一個包括int型數據的文本文件,然後將它保存到內部臨時數組,對數組進行排序後,以文本形式輸出到指定的文件上。因為是int類型的數據,沒有很嚴重的損失精度的問題。 ...
  • 該版本的Activiti運行須知: 1.JDK 6+,Eclipse最好是Kepler以上版本。 2.試驗功能都有EXPERIMENTAL標註,被標註的部分不應該視為穩定的。 有興趣的同學可以去瞭解下Activiti Explorer項目,他涵蓋了大部分Activiti的功能,還沒有Activiti ...
  • 一、手賤行為(✿◡‿◡) 在一次開發中通過xampp方式安裝了PHP環境,需要操作資料庫時通過phpmyadmin訪問MySQL,在一次資料庫操作時想起沒有設置密碼,於是直接在mysql資料庫中的user表中將root用戶的密碼設置為“123456”,關掉頁面,重啟MySQL,再次通過phpmyad ...
  • wxPython ImportError DLL load failed: ...
  • 原文鏈接:http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent 介紹部分就先不翻了 This weekend I decided to take a short vacation from my book ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...