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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pngencoder.java

?? 用java編寫的七星彩走勢分析圖
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.keypoint;import java.awt.Image;import java.awt.image.ImageObserver;import java.awt.image.PixelGrabber;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.util.zip.CRC32;import java.util.zip.Deflater;import java.util.zip.DeflaterOutputStream;/** * PngEncoder takes a Java Image object and creates a byte string which can be saved as a PNG file. * The Image is presumed to use the DirectColorModel. * * <p>Thanks to Jay Denny at KeyPoint Software *    http://www.keypoint.com/ * who let me develop this code on company time.</p> * * <p>You may contact me with (probably very-much-needed) improvements, * comments, and bug fixes at:</p> * *   <p><code>david@catcode.com</code></p> * * <p>This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version.</p> * * <p>This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details.</p> * * <p>You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * A copy of the GNU LGPL may be found at * <code>http://www.gnu.org/copyleft/lesser.html</code></p> * * @author J. David Eisenberg * @version 1.5, 19 Oct 2003 * * CHANGES: * -------- * 19-Nov-2002 : CODING STYLE CHANGES ONLY (by David Gilbert for Object Refinery Limited); * 19-Sep-2003 : Fix for platforms using EBCDIC (contributed by Paulo Soares); * 19-Oct-2003 : Change private fields to protected fields so that *               PngEncoderB can inherit them (JDE) *				 Fixed bug with calculation of nRows */public class PngEncoder extends Object {    /** Constant specifying that alpha channel should be encoded. */    public static final boolean ENCODE_ALPHA = true;    /** Constant specifying that alpha channel should not be encoded. */    public static final boolean NO_ALPHA = false;    /** Constants for filter (NONE) */    public static final int FILTER_NONE = 0;    /** Constants for filter (SUB) */    public static final int FILTER_SUB = 1;    /** Constants for filter (UP) */    public static final int FILTER_UP = 2;    /** Constants for filter (LAST) */    public static final int FILTER_LAST = 2;        /** IHDR tag. */    protected static final byte IHDR[] = {73, 72, 68, 82};        /** IDAT tag. */    protected static final byte IDAT[] = {73, 68, 65, 84};        /** IEND tag. */    protected static final byte IEND[] = {73, 69, 78, 68};    /** The png bytes. */    protected byte[] pngBytes;    /** The prior row. */    protected byte[] priorRow;    /** The left bytes. */    protected byte[] leftBytes;    /** The image. */    protected Image image;    /** The width. */    protected int width, height;    /** The byte position. */    protected int bytePos, maxPos;    /** CRC. */    protected CRC32 crc = new CRC32();    /** The CRC value. */    protected long crcValue;    /** Encode alpha? */    protected boolean encodeAlpha;    /** The filter type. */    protected int filter;    /** The bytes-per-pixel. */    protected int bytesPerPixel;    /** The compression level. */    protected int compressionLevel;    /**     * Class constructor     */    public PngEncoder() {        this(null, false, FILTER_NONE, 0);    }    /**     * Class constructor specifying Image to encode, with no alpha channel encoding.     *     * @param image A Java Image object which uses the DirectColorModel     * @see java.awt.Image     */    public PngEncoder(Image image) {        this(image, false, FILTER_NONE, 0);    }    /**     * Class constructor specifying Image to encode, and whether to encode alpha.     *     * @param image A Java Image object which uses the DirectColorModel     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     * @see java.awt.Image     */    public PngEncoder(Image image, boolean encodeAlpha) {        this(image, encodeAlpha, FILTER_NONE, 0);    }    /**     * Class constructor specifying Image to encode, whether to encode alpha, and filter to use.     *     * @param image A Java Image object which uses the DirectColorModel     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     * @param whichFilter 0=none, 1=sub, 2=up     * @see java.awt.Image     */    public PngEncoder(Image image, boolean encodeAlpha, int whichFilter) {        this(image, encodeAlpha, whichFilter, 0);    }    /**     * Class constructor specifying Image source to encode, whether to encode alpha, filter to use,     * and compression level.     *     * @param image A Java Image object     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     * @param whichFilter 0=none, 1=sub, 2=up     * @param compLevel 0..9     * @see java.awt.Image     */    public PngEncoder(Image image, boolean encodeAlpha, int whichFilter, int compLevel) {        this.image = image;        this.encodeAlpha = encodeAlpha;        setFilter(whichFilter);        if (compLevel >= 0 && compLevel <= 9) {            this.compressionLevel = compLevel;        }    }    /**     * Set the image to be encoded     *     * @param image A Java Image object which uses the DirectColorModel     * @see java.awt.Image     * @see java.awt.image.DirectColorModel     */    public void setImage(Image image) {        this.image = image;        pngBytes = null;    }    /**     * Creates an array of bytes that is the PNG equivalent of the current image, specifying     * whether to encode alpha or not.     *     * @param encodeAlpha boolean false=no alpha, true=encode alpha     * @return an array of bytes, or null if there was a problem     */    public byte[] pngEncode(boolean encodeAlpha) {        byte[]  pngIdBytes = {-119, 80, 78, 71, 13, 10, 26, 10};        if (image == null) {            return null;        }        width = image.getWidth(null);        height = image.getHeight(null);        /*         * start with an array that is big enough to hold all the pixels         * (plus filter bytes), and an extra 200 bytes for header info         */        pngBytes = new byte[((width + 1) * height * 3) + 200];        /*         * keep track of largest byte written to the array         */        maxPos = 0;        bytePos = writeBytes(pngIdBytes, 0);        //hdrPos = bytePos;        writeHeader();        //dataPos = bytePos;        if (writeImageData()) {            writeEnd();            pngBytes = resizeByteArray(pngBytes, maxPos);        }        else {            pngBytes = null;        }        return pngBytes;    }    /**     * Creates an array of bytes that is the PNG equivalent of the current image.     * Alpha encoding is determined by its setting in the constructor.     *     * @return an array of bytes, or null if there was a problem     */    public byte[] pngEncode() {        return pngEncode(encodeAlpha);    }    /**     * Set the alpha encoding on or off.     *     * @param encodeAlpha  false=no, true=yes     */    public void setEncodeAlpha(boolean encodeAlpha) {        this.encodeAlpha = encodeAlpha;    }    /**     * Retrieve alpha encoding status.     *     * @return boolean false=no, true=yes     */    public boolean getEncodeAlpha() {        return encodeAlpha;    }    /**     * Set the filter to use     *     * @param whichFilter from constant list     */    public void setFilter(int whichFilter) {        this.filter = FILTER_NONE;        if (whichFilter <= FILTER_LAST) {            this.filter = whichFilter;        }    }    /**     * Retrieve filtering scheme     *     * @return int (see constant list)     */    public int getFilter() {        return filter;    }    /**     * Set the compression level to use     *     * @param level 0 through 9     */    public void setCompressionLevel(int level) {        if (level >= 0 && level <= 9) {            this.compressionLevel = level;        }    }    /**     * Retrieve compression level     *     * @return int in range 0-9     */    public int getCompressionLevel() {        return compressionLevel;    }    /**     * Increase or decrease the length of a byte array.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一二三不卡| 久久久五月婷婷| 国产一区二区不卡老阿姨| 成人免费在线视频| 日韩精品一区二区三区四区| 在线亚洲一区二区| 国产激情一区二区三区| 午夜精品久久久久久久久| 国产日韩综合av| 91精品国产全国免费观看| 成人高清免费在线播放| 蜜桃在线一区二区三区| 亚洲一卡二卡三卡四卡五卡| 欧美极品aⅴ影院| 欧美一区二区三区男人的天堂| 91蜜桃网址入口| 春色校园综合激情亚洲| 国产又黄又大久久| 看电影不卡的网站| 亚洲成人动漫精品| **网站欧美大片在线观看| 久久女同互慰一区二区三区| 欧美一区二区三区色| 欧美日韩第一区日日骚| 色婷婷综合激情| 91农村精品一区二区在线| 福利一区二区在线| 国产成人精品aa毛片| 国内精品久久久久影院薰衣草| 日本免费在线视频不卡一不卡二| 亚洲午夜国产一区99re久久| 亚洲精选视频免费看| 国产精品久久久久影院亚瑟| 日本一区二区视频在线| 国产亚洲欧洲997久久综合| 日韩一级黄色片| 欧美一区二区在线视频| 欧美高清性hdvideosex| 欧美日韩精品一区二区三区| 在线观看日韩av先锋影音电影院| 99精品视频在线播放观看| 成人av片在线观看| 9人人澡人人爽人人精品| 成人免费毛片高清视频| 成人手机电影网| av中文字幕在线不卡| 99re在线视频这里只有精品| 成人av在线资源| 91在线免费播放| 欧美亚洲精品一区| 欧美美女黄视频| 日韩亚洲欧美高清| 久久伊人中文字幕| 国产精品欧美久久久久无广告| 综合久久给合久久狠狠狠97色| 国产精品久久久久久久午夜片| 亚洲国产精品v| 亚洲欧洲国产专区| 亚洲品质自拍视频| 亚洲香蕉伊在人在线观| 日韩黄色片在线观看| 免费人成网站在线观看欧美高清| 久久爱另类一区二区小说| 国产精品资源站在线| 成人av动漫在线| 欧美特级限制片免费在线观看| 正在播放亚洲一区| 精品国产一区二区在线观看| 国产精品久久久久一区二区三区共| 中文字幕日韩一区| 偷拍一区二区三区四区| 久久99热狠狠色一区二区| 粉嫩绯色av一区二区在线观看| 91在线播放网址| 欧美高清激情brazzers| 精品免费视频一区二区| 中文字幕在线一区二区三区| 色综合视频一区二区三区高清| 91免费在线播放| 无码av免费一区二区三区试看 | 欧美一级高清片| 日韩精品一区国产麻豆| 国产精品久久午夜夜伦鲁鲁| 亚洲第一久久影院| 精品一区二区国语对白| fc2成人免费人成在线观看播放| 欧美在线一区二区三区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 亚洲自拍偷拍麻豆| 激情小说亚洲一区| 欧美在线观看你懂的| 日韩精品专区在线影院重磅| 中文字幕中文乱码欧美一区二区| 日韩精品一二三四| 成人高清免费观看| 欧美一卡二卡三卡| 亚洲免费观看高清完整版在线观看| 日日夜夜精品视频天天综合网| 福利电影一区二区三区| 日韩一级视频免费观看在线| 亚洲欧美激情一区二区| 国产一区二区三区四区五区入口 | 26uuu久久天堂性欧美| 中文字幕亚洲不卡| 激情五月婷婷综合| 欧美午夜电影网| 国产欧美一区二区精品久导航| 婷婷夜色潮精品综合在线| 95精品视频在线| 久久久精品免费观看| 久久超碰97中文字幕| 在线综合亚洲欧美在线视频| 亚洲人成小说网站色在线| 国产精品亚洲第一| 日韩精品一区二区三区在线 | 99精品黄色片免费大全| 久久久777精品电影网影网| 日韩精品视频网| 欧美综合色免费| 亚洲美女偷拍久久| 成人福利电影精品一区二区在线观看 | 亚洲午夜久久久久久久久久久| 国产黑丝在线一区二区三区| 精品乱人伦一区二区三区| 奇米色一区二区| 欧美日韩视频一区二区| 亚洲精品视频在线看| av网站一区二区三区| 中文字幕精品在线不卡| 福利一区二区在线| 国产午夜精品福利| 国产成人在线视频网站| 久久久99精品免费观看| 国产麻豆视频一区二区| www国产亚洲精品久久麻豆| 久久精品国产成人一区二区三区 | 99精品视频在线观看免费| 国产精品区一区二区三区| 久久99久久99小草精品免视看| 久久夜色精品一区| 色婷婷一区二区| 毛片av一区二区三区| 亚洲精品一二三| 日韩欧美国产系列| 免费看欧美女人艹b| 亚洲精品免费看| 国产精品白丝在线| 久久久午夜精品| 国产亚洲精品中文字幕| 久久亚区不卡日本| 91精品国产欧美一区二区| 欧美一区二区国产| 欧美日韩免费观看一区二区三区 | 精品久久人人做人人爰| 制服丝袜亚洲色图| 欧美成人a视频| 欧美一区二区黄色| 国产精品欧美综合在线| 亚洲欧美成aⅴ人在线观看| 欧美一区二区三区免费在线看| 国产精品一区二区果冻传媒| av在线一区二区| www.在线成人| 91精品国产综合久久久久久久 | 日韩一级精品视频在线观看| 另类调教123区| 亚洲国产精品二十页| 99久久免费国产| 午夜天堂影视香蕉久久| 精品国产伦一区二区三区观看方式| 国产精品2024| 亚洲精品乱码久久久久久久久| 制服丝袜日韩国产| 国产成人av电影免费在线观看| 亚洲啪啪综合av一区二区三区| 欧美一区二区啪啪| 成人高清av在线| 日韩av电影天堂| 国产精品久久夜| 日韩一区二区免费电影| 成人免费视频视频在线观看免费| 亚洲国产aⅴ天堂久久| 久久午夜免费电影| 色综合 综合色| 国产精品自拍在线| 亚洲一区二区成人在线观看| 久久久久久久综合狠狠综合| 欧洲亚洲精品在线| 国产.欧美.日韩| 日日摸夜夜添夜夜添国产精品| 国产婷婷色一区二区三区在线| 欧美日韩精品三区| 成人av一区二区三区| 久久黄色级2电影| 亚洲成人免费电影| 中文在线一区二区| 精品福利一二区| 在线观看91av| 色播五月激情综合网| 丁香婷婷综合激情五月色|