亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pngencoder.java

?? 無線通信的主要編程軟件,是無線通信工作人員的必備工具,關天相關教程我會在后續(xù)傳上.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        return offset + data.length;    }    /**     * Write an array of bytes into the pngBytes array, specifying number of bytes to write.     * Note: This routine has the side effect of updating     * maxPos, the largest element written in the array.     * The array is resized by 1000 bytes or the length     * of the data to be written, whichever is larger.     *     * @param data The data to be written into pngBytes.     * @param nBytes The number of bytes to be written.     * @param offset The starting point to write to.     * @return The next place to be written to in the pngBytes array.     */    protected int writeBytes( byte[] data, int nBytes, int offset )    {        maxPos = Math.max( maxPos, offset + nBytes );        if (nBytes + offset > pngBytes.length)        {            pngBytes = resizeByteArray( pngBytes, pngBytes.length +                Math.max( 1000, nBytes ) );        }        System.arraycopy( data, 0, pngBytes, offset, nBytes );        return offset + nBytes;    }    /**     * Write a two-byte integer into the pngBytes array at a given position.     *     * @param n The integer to be written into pngBytes.     * @param offset The starting point to write to.     * @return The next place to be written to in the pngBytes array.     */    protected int writeInt2( int n, int offset )    {        byte[] temp = { (byte)((n >> 8) & 0xff),            (byte) (n & 0xff) };        return writeBytes( temp, offset );    }    /**     * Write a four-byte integer into the pngBytes array at a given position.     *     * @param n The integer to be written into pngBytes.     * @param offset The starting point to write to.     * @return The next place to be written to in the pngBytes array.     */    protected int writeInt4( int n, int offset )    {        byte[] temp = { (byte)((n >> 24) & 0xff),            (byte) ((n >> 16) & 0xff ),            (byte) ((n >> 8) & 0xff ),            (byte) ( n & 0xff ) };        return writeBytes( temp, offset );    }    /**     * Write a single byte into the pngBytes array at a given position.     *     * @param n The integer to be written into pngBytes.     * @param offset The starting point to write to.     * @return The next place to be written to in the pngBytes array.     */    protected int writeByte( int b, int offset )    {        byte[] temp = { (byte) b };        return writeBytes( temp, offset );    }    /**     * Write a string into the pngBytes array at a given position.     * This uses the getBytes method, so the encoding used will     * be its default.     *     * @param n The integer to be written into pngBytes.     * @param offset The starting point to write to.     * @return The next place to be written to in the pngBytes array.     * @see java.lang.String#getBytes()     */    protected int writeString( String s, int offset )    {        return writeBytes( s.getBytes(), offset );    }    /**     * Write a PNG "IHDR" chunk into the pngBytes array.     */    protected void writeHeader()    {        int startPos;        startPos = bytePos = writeInt4( 13, bytePos );        bytePos = writeString( "IHDR", bytePos );        width = image.getWidth( null );        height = image.getHeight( null );        bytePos = writeInt4( width, bytePos );        bytePos = writeInt4( height, bytePos );        bytePos = writeByte( 8, bytePos ); // bit depth        bytePos = writeByte( (encodeAlpha) ? 6 : 2, bytePos ); // direct model        bytePos = writeByte( 0, bytePos ); // compression method        bytePos = writeByte( 0, bytePos ); // filter method        bytePos = writeByte( 0, bytePos ); // no interlace        crc.reset();        crc.update( pngBytes, startPos, bytePos-startPos );        crcValue = crc.getValue();        bytePos = writeInt4( (int) crcValue, bytePos );    }    /**     * Perform "sub" filtering on the given row.     * Uses temporary array leftBytes to store the original values     * of the previous pixels.  The array is 16 bytes long, which     * will easily hold two-byte samples plus two-byte alpha.     *     * @param pixels The array holding the scan lines being built     * @param startPos Starting position within pixels of bytes to be filtered.     * @param width Width of a scanline in pixels.     */    protected void filterSub( byte[] pixels, int startPos, int width )    {        int i;        int offset = bytesPerPixel;        int actualStart = startPos + offset;        int nBytes = width * bytesPerPixel;        int leftInsert = offset;        int leftExtract = 0;        byte current_byte;        for (i=actualStart; i < startPos + nBytes; i++)        {            leftBytes[leftInsert] =  pixels[i];            pixels[i] = (byte) ((pixels[i] - leftBytes[leftExtract]) % 256);            leftInsert = (leftInsert+1) % 0x0f;            leftExtract = (leftExtract + 1) % 0x0f;        }    }    /**     * Perform "up" filtering on the given row.     * Side effect: refills the prior row with current row     *     * @param pixels The array holding the scan lines being built     * @param startPos Starting position within pixels of bytes to be filtered.     * @param width Width of a scanline in pixels.     */    protected void filterUp( byte[] pixels, int startPos, int width )    {        int     i, nBytes;        byte    current_byte;        nBytes = width * bytesPerPixel;        for (i=0; i < nBytes; i++)        {            current_byte = pixels[startPos + i];            pixels[startPos + i] = (byte) ((pixels[startPos  + i] - priorRow[i]) % 256);            priorRow[i] = current_byte;        }    }    /**     * Write the image data into the pngBytes array.     * This will write one or more PNG "IDAT" chunks. In order     * to conserve memory, this method grabs as many rows as will     * fit into 32K bytes, or the whole image; whichever is less.     *     *     * @return true if no errors; false if error grabbing pixels     */    protected boolean writeImageData()    {        int rowsLeft = height;  // number of rows remaining to write        int startRow = 0;       // starting row to process this time through        int nRows;              // how many rows to grab at a time        byte[] scanLines;       // the scan lines to be compressed        int scanPos;            // where we are in the scan lines        int startPos;           // where this line's actual pixels start (used for filtering)        byte[] compressedLines; // the resultant compressed lines        int nCompressed;        // how big is the compressed area?        int depth;              // color depth ( handle only 8 or 32 )        PixelGrabber pg;        bytesPerPixel = (encodeAlpha) ? 4 : 3;        Deflater scrunch = new Deflater( compressionLevel );        ByteArrayOutputStream outBytes =             new ByteArrayOutputStream(1024);                    DeflaterOutputStream compBytes =            new DeflaterOutputStream( outBytes, scrunch );        try        {            while (rowsLeft > 0)            {                nRows = Math.min( 32767 / (width*(bytesPerPixel+1)), rowsLeft );                // nRows = rowsLeft;                int[] pixels = new int[width * nRows];                pg = new PixelGrabber(image, 0, startRow,                    width, nRows, pixels, 0, width);                try {                    pg.grabPixels();                }                catch (Exception e) {                    System.err.println("interrupted waiting for pixels!");                    return false;                }                if ((pg.getStatus() & ImageObserver.ABORT) != 0) {                    System.err.println("image fetch aborted or errored");                    return false;                }                /*                 * Create a data chunk. scanLines adds "nRows" for                 * the filter bytes.                  */                scanLines = new byte[width * nRows * bytesPerPixel +  nRows];                if (filter == FILTER_SUB)                {                    leftBytes = new byte[16];                }                if (filter == FILTER_UP)                {                    priorRow = new byte[width*bytesPerPixel];                }                scanPos = 0;                startPos = 1;                for (int i=0; i<width*nRows; i++)                {                    if (i % width == 0)                    {                        scanLines[scanPos++] = (byte) filter;                         startPos = scanPos;                    }                    scanLines[scanPos++] = (byte) ((pixels[i] >> 16) & 0xff);                    scanLines[scanPos++] = (byte) ((pixels[i] >>  8) & 0xff);                    scanLines[scanPos++] = (byte) ((pixels[i]      ) & 0xff);                    if (encodeAlpha)                    {                        scanLines[scanPos++] = (byte) ((pixels[i] >> 24) & 0xff );                    }                    if ((i % width == width-1) && (filter != FILTER_NONE))                    {                        if (filter == FILTER_SUB)                        {                            filterSub( scanLines, startPos, width );                        }                        if (filter == FILTER_UP)                        {                            filterUp( scanLines, startPos, width );                        }                    }                }                /*                 * Write these lines to the output area                 */                compBytes.write( scanLines, 0, scanPos );                startRow += nRows;                rowsLeft -= nRows;            }            compBytes.close();            /*             * Write the compressed bytes             */            compressedLines = outBytes.toByteArray();            nCompressed = compressedLines.length;            crc.reset();            bytePos = writeInt4( nCompressed, bytePos );            bytePos = writeString("IDAT", bytePos );            crc.update("IDAT".getBytes());            bytePos = writeBytes( compressedLines, nCompressed, bytePos );            crc.update( compressedLines, 0, nCompressed );            crcValue = crc.getValue();            bytePos = writeInt4( (int) crcValue, bytePos );            scrunch.finish();            return true;        }        catch (IOException e)        {            System.err.println( e.toString());            return false;        }    }    /**     * Write a PNG "IEND" chunk into the pngBytes array.     */    protected void writeEnd()    {        bytePos = writeInt4( 0, bytePos );        bytePos = writeString( "IEND", bytePos );        crc.reset();        crc.update("IEND".getBytes());        crcValue = crc.getValue();        bytePos = writeInt4( (int) crcValue, bytePos );    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色丁香久综合在线久综合在线观看| 青草国产精品久久久久久| 激情成人综合网| 26uuu亚洲综合色欧美| 久久er精品视频| 国产女人18水真多18精品一级做| 国产精品一品视频| ...xxx性欧美| 欧美日韩久久一区二区| 蜜臀久久99精品久久久画质超高清 | 日韩丝袜美女视频| 久久成人18免费观看| 五月婷婷综合在线| 欧美精品久久天天躁| 国模冰冰炮一区二区| 欧美高清在线一区二区| 日本韩国欧美在线| 蜜臀av在线播放一区二区三区| 2020国产精品自拍| 91碰在线视频| 男女性色大片免费观看一区二区| 亚洲精品一区二区三区影院 | 国产精品一区二区免费不卡| 中文字幕精品一区二区精品绿巨人| 99麻豆久久久国产精品免费| 午夜精品一区二区三区免费视频 | 精品在线观看视频| 国产精品理论在线观看| 欧美午夜精品久久久久久超碰 | 一区二区三区免费| 日韩欧美中文一区| 91免费版在线看| 极品尤物av久久免费看| 一区二区三区在线播放| 精品国产伦一区二区三区观看体验 | 色综合久久久久久久| 麻豆极品一区二区三区| 亚洲精品国产视频| 精品处破学生在线二十三| 在线影视一区二区三区| 国产一区二区日韩精品| 亚洲午夜视频在线观看| 中文字幕av不卡| 91精品视频网| 91久久奴性调教| 国产精品主播直播| 五月激情丁香一区二区三区| 中文字幕在线一区二区三区| 精品99一区二区三区| 欧美在线小视频| gogogo免费视频观看亚洲一| 精品系列免费在线观看| 日韩国产高清影视| 亚洲男人都懂的| 国产日韩一级二级三级| 日韩三级伦理片妻子的秘密按摩| 色婷婷精品大在线视频| 成人黄色综合网站| 国产精品中文字幕一区二区三区| 日韩av一区二区在线影视| 一区二区三区91| 亚洲精选视频免费看| 中文在线资源观看网站视频免费不卡| 91精品国产入口在线| 欧美三级中文字| 日本福利一区二区| 91亚洲精品乱码久久久久久蜜桃 | 国产日韩v精品一区二区| 欧美一区二区三区视频在线| 欧美久久久久久久久久| 91国产精品成人| 国产色91在线| 日韩精品一区二区三区三区免费 | 7777精品久久久大香线蕉| 欧美午夜不卡在线观看免费| 欧美在线视频日韩| 欧美性猛交一区二区三区精品| 色呦呦国产精品| 在线精品视频一区二区三四| 91激情在线视频| 欧美色综合天天久久综合精品| 91老师片黄在线观看| 一本到高清视频免费精品| 色婷婷av一区二区| 欧美色电影在线| 777色狠狠一区二区三区| 制服丝袜国产精品| 日韩一区二区三区在线观看| 精品久久久三级丝袜| 26uuu国产在线精品一区二区| 国产亚洲综合性久久久影院| 国产精品国产馆在线真实露脸| 一区在线中文字幕| 亚洲一级电影视频| 日本人妖一区二区| 国产精品自拍毛片| proumb性欧美在线观看| 欧美在线免费视屏| 911精品国产一区二区在线| 日韩一本二本av| 久久久久久久久久看片| 综合av第一页| 日韩av网站免费在线| 国产美女视频91| 色av成人天堂桃色av| 8x8x8国产精品| 国产亚洲欧美在线| 亚洲激情综合网| 久久99国产乱子伦精品免费| 成人小视频免费观看| 色天天综合色天天久久| 欧美一区二区三区公司| 国产日韩成人精品| 亚洲韩国一区二区三区| 国产乱子轮精品视频| 91香蕉视频黄| 欧美一级专区免费大片| 中文字幕一区二区三区精华液 | 9191久久久久久久久久久| 久久久天堂av| 亚洲国产综合人成综合网站| 韩国精品在线观看| 在线观看免费成人| 国产日韩欧美高清| 日韩精品一二三四| av亚洲精华国产精华精华| 日韩三级在线观看| 亚洲精品亚洲人成人网| 狠狠色丁香久久婷婷综合_中| 日本久久电影网| 久久久精品免费网站| 日韩高清一级片| 91在线视频网址| 久久精品亚洲精品国产欧美kt∨| 五月激情六月综合| 色综合久久99| 国产精品理论片在线观看| 毛片基地黄久久久久久天堂| 欧美在线影院一区二区| 国产精品视频你懂的| 国产一区二三区好的| 4hu四虎永久在线影院成人| 亚洲欧美日韩久久精品| 粉嫩13p一区二区三区| 精品国产精品网麻豆系列| 午夜久久电影网| 欧洲av在线精品| 亚洲人成人一区二区在线观看 | 国产日产欧美一区二区三区| 日本伊人午夜精品| 精品视频资源站| 一区二区三区在线免费| 成人国产电影网| 国产亚洲一本大道中文在线| 奇米一区二区三区av| 欧美日韩午夜在线视频| 亚洲一区二区三区自拍| 97国产精品videossex| 国产精品卡一卡二卡三| 国产不卡在线视频| 国产三级精品视频| 国产一区在线精品| 日韩精品一区二区三区在线播放 | 激情深爱一区二区| 日韩欧美一级特黄在线播放| 日韩精品国产欧美| 51久久夜色精品国产麻豆| 午夜精品国产更新| 欧美日韩一级二级| 日韩中文字幕91| 欧美一级片免费看| 久久99精品久久久久久久久久久久| 日韩丝袜美女视频| 看电视剧不卡顿的网站| 亚洲精品在线观看视频| 国产在线一区二区综合免费视频| 精品噜噜噜噜久久久久久久久试看| 麻豆成人在线观看| 亚洲黄色小视频| 欧美日韩国产电影| 日本成人在线不卡视频| 欧美v日韩v国产v| 国产美女视频91| 国产精品不卡在线| 91黄色在线观看| 日韩精品一卡二卡三卡四卡无卡| 日韩免费性生活视频播放| 国产精品一二一区| 亚洲老妇xxxxxx| 欧美一区二区三区四区高清| 国产精品影音先锋| 国产精品久久久久aaaa| 色悠久久久久综合欧美99| 午夜精品久久久久| 精品粉嫩超白一线天av| jlzzjlzz国产精品久久| 香蕉影视欧美成人| 久久久久久综合| 91国偷自产一区二区使用方法| 美女在线视频一区|