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

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

?? pngencoder.java

?? 用java編寫的七星彩走勢分析圖
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
     *     * @param array The original array.     * @param newLength The length you wish the new array to have.     * @return Array of newly desired length. If shorter than the     *         original, the trailing elements are truncated.     */    protected byte[] resizeByteArray(byte[] array, int newLength) {        byte[]  newArray = new byte[newLength];        int     oldLength = array.length;        System.arraycopy(array, 0, newArray, 0, Math.min(oldLength, newLength));        return newArray;    }    /**     * Write an array of bytes into the pngBytes array.     * 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 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 offset) {        maxPos = Math.max(maxPos, offset + data.length);        if (data.length + offset > pngBytes.length) {            pngBytes = resizeByteArray(pngBytes, pngBytes.length + Math.max(1000, data.length));        }        System.arraycopy(data, 0, pngBytes, offset, data.length);        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 b 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 PNG "IHDR" chunk into the pngBytes array.     */    protected void writeHeader() {        int startPos;        startPos = bytePos = writeInt4(13, bytePos);        bytePos = writeBytes(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;        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    currentByte;        nBytes = width * bytesPerPixel;        for (i = 0; i < nBytes; i++) {            currentByte = pixels[startPos + i];            pixels[startPos + i] = (byte) ((pixels[startPos  + i] - priorRow[i]) % 256);            priorRow[i] = currentByte;        }    }    /**     * 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 = Math.max( nRows, 1 );                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 = writeBytes(IDAT, bytePos);            crc.update(IDAT);            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 = writeBytes(IEND, bytePos);        crc.reset();        crc.update(IEND);        crcValue = crc.getValue();        bytePos = writeInt4((int) crcValue, bytePos);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区中文字幕在线| 91精品国产福利| 亚洲成av人影院在线观看网| av电影天堂一区二区在线观看| 欧美日韩国产免费一区二区| 成人av在线网| 91精品国产综合久久蜜臀| 久久精品视频网| 欧美午夜精品久久久| 日本欧美大码aⅴ在线播放| 欧美综合色免费| 久久精品国产色蜜蜜麻豆| 不卡一二三区首页| 国产日韩三级在线| 免播放器亚洲一区| 欧美日韩国产首页| 亚洲精品欧美综合四区| 99免费精品视频| 国产欧美一区二区三区网站| 久久激五月天综合精品| 欧美一区二区女人| 日韩高清在线观看| 欧美二区三区的天堂| 亚洲制服丝袜av| 在线观看不卡一区| 玉足女爽爽91| 在线观看欧美日本| 亚洲大尺度视频在线观看| 欧美在线三级电影| 亚洲成人激情自拍| 欧美乱妇20p| 视频精品一区二区| 欧美成人vr18sexvr| 久久精品国产网站| 久久精品视频网| 不卡一区二区中文字幕| 亚洲免费观看高清完整版在线 | 色综合久久中文综合久久97| 国产精品三级久久久久三级| 国产成人在线电影| 国产精品美女久久久久久 | 美美哒免费高清在线观看视频一区二区| 在线看不卡av| 午夜视黄欧洲亚洲| 欧美一区二区私人影院日本| 久草热8精品视频在线观看| xfplay精品久久| 成人app网站| 亚洲成人一二三| 日韩欧美一级二级三级| 国产成人综合在线播放| 中文字幕永久在线不卡| 欧美综合天天夜夜久久| 久久99精品久久只有精品| 国产午夜亚洲精品羞羞网站| 一本高清dvd不卡在线观看| 午夜视频在线观看一区二区三区| 日韩欧美国产高清| 北岛玲一区二区三区四区| 一区二区三区高清在线| 日韩一区二区三区电影| 成人午夜精品一区二区三区| 亚洲一区在线观看视频| 欧美成人欧美edvon| 不卡的av电影| 日韩不卡一二三区| 国产精品久久久久久久浪潮网站| 欧美午夜电影一区| 国产成人在线视频播放| 亚洲第一福利一区| 国产精品久久久久婷婷| 欧美一区中文字幕| 成人国产免费视频| 麻豆精品久久精品色综合| 亚洲人快播电影网| 久久女同互慰一区二区三区| 色妹子一区二区| 国产一区二区三区免费在线观看| 一区二区三区资源| 国产片一区二区三区| 欧美一区二区视频免费观看| 91在线观看高清| 国产成人精品www牛牛影视| 午夜精品国产更新| 亚洲天堂免费在线观看视频| 欧美电影免费观看高清完整版在线 | 一区二区三区 在线观看视频| 日韩三区在线观看| 欧美亚洲尤物久久| www.成人在线| 国产毛片精品视频| 免费精品视频在线| 午夜私人影院久久久久| 亚洲另类一区二区| 中文字幕免费不卡在线| 2020国产精品久久精品美国| 欧美福利视频一区| 色素色在线综合| 92国产精品观看| www.一区二区| 成人小视频在线| 国产伦精品一区二区三区在线观看| 日韩激情一区二区| 午夜精品国产更新| 婷婷开心久久网| 丝袜美腿亚洲一区二区图片| 亚洲国产欧美日韩另类综合| 亚洲黄网站在线观看| 亚洲乱码国产乱码精品精可以看| 国产精品久久久久一区| 国产精品沙发午睡系列990531| 久久久亚洲国产美女国产盗摄| 26uuu国产在线精品一区二区| 欧美精品一区二区三| 欧美tk丨vk视频| 2021国产精品久久精品| 久久精品亚洲国产奇米99| 久久久www成人免费无遮挡大片| 26uuu国产日韩综合| 久久久久综合网| 国产蜜臀av在线一区二区三区| 国产欧美日韩亚州综合| 国产精品护士白丝一区av| 亚洲欧美自拍偷拍| 亚洲黄色尤物视频| 日韩专区中文字幕一区二区| 免费成人深夜小野草| 狠狠色狠狠色综合日日91app| 国产成人午夜视频| 99久久免费国产| 欧美午夜精品久久久久久孕妇| 51久久夜色精品国产麻豆| 日韩欧美在线123| 国产欧美日韩另类一区| 亚洲人123区| 日韩精品国产欧美| 国产在线精品一区二区三区不卡| 风间由美一区二区三区在线观看| 99国产精品久久| 欧美精品高清视频| 久久只精品国产| 亚洲欧美日韩久久精品| 亚洲成av人影院在线观看网| 国产一区二区三区最好精华液| 成人18视频日本| 3atv在线一区二区三区| 国产午夜亚洲精品理论片色戒| 亚洲欧美一区二区在线观看| 手机精品视频在线观看| 国产成人av电影在线| 在线亚洲一区二区| 欧美精品一区二区三| 一区二区在线观看免费视频播放 | 亚洲激情六月丁香| 美女免费视频一区| av成人免费在线| 精品日韩成人av| 自拍偷拍欧美精品| 久久精品72免费观看| 色哟哟在线观看一区二区三区| 日韩欧美国产综合| 亚洲综合久久久| 成人晚上爱看视频| 日韩三级.com| 亚洲自拍欧美精品| 不卡av在线免费观看| 精品久久人人做人人爱| 亚洲一区二区三区四区五区黄| 国产一区二区三区在线观看免费| 欧美日韩国产另类一区| 国产精品剧情在线亚洲| 精品一区二区免费看| 欧美日韩精品一区二区天天拍小说 | 琪琪一区二区三区| 91福利小视频| 国产精品高潮呻吟久久| 黄页网站大全一区二区| 在线观看91精品国产麻豆| 中文字幕日本不卡| 高清视频一区二区| 精品国产乱码久久久久久影片| 亚洲大片免费看| 欧亚洲嫩模精品一区三区| 18成人在线视频| 成人综合婷婷国产精品久久蜜臀| 日韩免费一区二区| 日本午夜精品一区二区三区电影| 日本乱人伦aⅴ精品| 亚洲人成网站在线| 成人视屏免费看| 国产日韩欧美精品电影三级在线| 极品美女销魂一区二区三区| 欧美一区二区三区不卡| 亚洲国产成人av网| 欧美性三三影院| 亚洲影院免费观看| 在线观看日韩一区| 午夜精品福利一区二区蜜股av| 在线国产电影不卡| 亚洲一二三四区|