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

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

?? pngencoderb.java

?? 用java編寫的七星彩走勢分析圖
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
package com.keypoint;import java.awt.Image;import java.awt.image.BufferedImage;import java.awt.image.DataBuffer;import java.awt.image.IndexColorModel;import java.awt.image.ImageObserver;import java.awt.image.PixelGrabber;import java.awt.image.WritableRaster;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.util.zip.CRC32;import java.util.zip.Deflater;import java.util.zip.DeflaterOutputStream;/** * PngEncoderB takes a Java BufferedImage object and creates a byte string which can be saved as a PNG file. * The encoder will accept BufferedImages with eight-bit samples * or 4-byte ARGB samples.  *  * <p>There is also code to handle 4-byte samples returned as * one int per pixel, but that has not been tested.</p> * * <p>Thanks to Jay Denny at KeyPoint Software *    <code>http://www.keypoint.com/</code> * 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-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 *				 Added modifications for unsigned short images *					(contributed by Christian at xpogen.com)  */public class PngEncoderB extends PngEncoder {	/** PLTE tag. */	private static final byte PLTE[] = { 80, 76, 84, 69 };    protected BufferedImage image;    protected WritableRaster wRaster;    protected int tType;    /**     * Class constructor     *     */    public PngEncoderB()    {        this( null, false, FILTER_NONE, 0 );    }    /**     * Class constructor specifying BufferedImage to encode, with no alpha channel encoding.     *     * @param image A Java BufferedImage object     */    public PngEncoderB( BufferedImage image )    {        this(image, false, FILTER_NONE, 0);    }    /**     * Class constructor specifying BufferedImage to encode, and whether to encode alpha.     *     * @param image A Java BufferedImage object     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     */    public PngEncoderB( BufferedImage image, boolean encodeAlpha )    {        this( image, encodeAlpha, FILTER_NONE, 0 );    }    /**     * Class constructor specifying BufferedImage to encode, whether to encode alpha, and filter to use.     *     * @param image A Java BufferedImage object     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     * @param whichFilter 0=none, 1=sub, 2=up     */    public PngEncoderB( BufferedImage image, boolean encodeAlpha,       int whichFilter )    {        this( image, encodeAlpha, whichFilter, 0 );    }    /**     * Class constructor specifying BufferedImage source to encode, whether to encode alpha, filter to use, and compression level     *     * @param image A Java BufferedImage object     * @param encodeAlpha Encode the alpha channel? false=no; true=yes     * @param whichFilter 0=none, 1=sub, 2=up     * @param compLevel 0..9     */    public PngEncoderB( BufferedImage 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 BufferedImage to be encoded     *     * @param BufferedImage A Java BufferedImage object     */    public void setImage( BufferedImage 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 };        int     i;        if (image == null)        {            System.err.println("pngEncode: image is null; returning null");			return null;        }        width = image.getWidth( null );        height = image.getHeight( null );        this.image = image;        if (!establishStorageInfo())        {			System.err.println("pngEncode: cannot establish storage info");            return 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        {			System.err.println("pngEncode: writeImageData failed => null");            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 );    }    /**     *      * Get and set variables that determine how picture is stored.     *     * Retrieves the writable raster of the buffered image,     * as well its transfer type.     *     * Sets number of output bytes per pixel, and, if only     * eight-bit bytes, turns off alpha encoding.     * @return true if 1-byte or 4-byte data, false otherwise     */    protected boolean establishStorageInfo()    {        int dataBytes;            wRaster = image.getRaster();        dataBytes = wRaster.getNumDataElements();        tType = wRaster.getTransferType();		if (((tType == DataBuffer.TYPE_BYTE  ) && (dataBytes == 4)) ||			((tType == DataBuffer.TYPE_INT   ) && (dataBytes == 1)) ||           // on Win 2k/ME, tType == 1, dataBytes == 1			((tType == DataBuffer.TYPE_USHORT) && (dataBytes == 1)) )        {            bytesPerPixel = (encodeAlpha) ? 4 : 3;        }        else if ((tType == DataBuffer.TYPE_BYTE) && (dataBytes == 1))        {            bytesPerPixel = 1;            encodeAlpha = false;    // one-byte samples        }        else		{			System.err.println("PNG encoder cannot establish storage info:");			System.err.println("  TransferType == " + tType );			System.err.println("  NumDataElements == " + dataBytes);			return false;		}        return true;    }    /**     * Write a PNG "IHDR" chunk into the pngBytes array.     */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本不卡123| 国产一区二区在线观看免费| 国产精品88888| 日韩一区二区在线观看视频播放| 国产精品久久久久9999吃药| 久热成人在线视频| 26uuu色噜噜精品一区二区| 亚洲人成7777| 欧美三级在线播放| 亚洲6080在线| 欧美视频一区二区三区四区| 亚洲丝袜精品丝袜在线| 北岛玲一区二区三区四区| 国产日韩欧美电影| 99国产精品99久久久久久| 欧美精品一区二区不卡 | 欧美视频完全免费看| 亚洲免费观看高清完整版在线| 色噜噜狠狠成人网p站| 亚洲在线免费播放| 日韩午夜三级在线| 国产剧情av麻豆香蕉精品| 国产欧美一区在线| 色系网站成人免费| 青青草国产成人99久久| 久久综合久久综合亚洲| aa级大片欧美| 美腿丝袜亚洲综合| 亚洲人精品午夜| 欧美大片免费久久精品三p| 国产精品亚洲а∨天堂免在线| ...av二区三区久久精品| 欧美日韩精品电影| 奇米精品一区二区三区四区| 欧美日韩中字一区| 成a人片国产精品| 婷婷中文字幕一区三区| 国产精品美女久久久久久| 7777精品伊人久久久大香线蕉的 | 精品少妇一区二区三区视频免付费 | 久久精品男人天堂av| 欧美日韩一区中文字幕| 91丨九色丨国产丨porny| 黑人巨大精品欧美黑白配亚洲| 亚洲激情欧美激情| 久久久99精品久久| 日韩精品中文字幕在线一区| 在线精品视频小说1| 国产精品一区二区三区乱码| 亚洲乱码国产乱码精品精可以看| 久久看人人爽人人| 欧美一区二区三区精品| 欧美日韩久久一区二区| 色婷婷国产精品久久包臀| 99久久伊人精品| 成人小视频在线观看| 国产精品 欧美精品| 国产一区亚洲一区| 国产美女在线观看一区| 久久精品二区亚洲w码| 免费精品视频最新在线| 日韩高清一区二区| 极品少妇xxxx精品少妇| 国产麻豆91精品| 成人久久视频在线观看| 成人少妇影院yyyy| 91性感美女视频| 欧美三级韩国三级日本三斤| 欧美日韩夫妻久久| 这里只有精品视频在线观看| 91激情在线视频| 欧美日韩你懂的| 久久久国产精品不卡| 亚洲视频在线一区| 美女爽到高潮91| 成人综合在线观看| 欧美日韩亚洲综合一区| 久久综合国产精品| 亚洲美女在线一区| 久久精品久久综合| 99精品欧美一区二区三区小说| 欧美日韩午夜影院| 日本一区二区在线不卡| 免费观看在线综合色| 一本在线高清不卡dvd| 色狠狠综合天天综合综合| 欧美成人一区二区三区在线观看| 欧美国产日本韩| 日韩视频免费观看高清完整版在线观看 | 国产精品456| 在线播放91灌醉迷j高跟美女| 在线播放中文字幕一区| 制服丝袜在线91| 亚洲成人av电影在线| 一本一道综合狠狠老| 欧美综合一区二区三区| 亚洲国产成人私人影院tom| 日本sm残虐另类| 欧美一区二区性放荡片| 一区二区三区四区中文字幕| 精品一区二区三区欧美| 欧美高清dvd| 首页国产欧美久久| 欧美猛男gaygay网站| 午夜精品久久久久影视| 欧美三级电影网| 日韩电影在线看| 日韩视频永久免费| 国产一区999| 成人欧美一区二区三区白人 | 成人综合在线网站| 国产精品久久久久三级| 欧美人与z0zoxxxx视频| 国产亚洲综合色| 不卡电影免费在线播放一区| 国产精品久久三区| 欧美另类videos死尸| 老鸭窝一区二区久久精品| 久久人人超碰精品| 一本色道久久综合精品竹菊| 亚洲电影第三页| 亚洲精品一区二区三区99| 成人国产精品免费网站| 一区二区三区四区在线播放| 91精品国模一区二区三区| 久久97超碰国产精品超碰| 1000精品久久久久久久久| 91精品国产综合久久精品图片 | 国产清纯美女被跳蛋高潮一区二区久久w| 久久国产人妖系列| 一区二区三区国产| 2021久久国产精品不只是精品| 在线视频国内自拍亚洲视频| 国产一区视频导航| 亚洲国产精品v| 日韩一区二区三区av| av午夜一区麻豆| 免费精品视频最新在线| 一区二区三区欧美| 中文字幕不卡的av| 欧美成人r级一区二区三区| 欧美性大战久久久久久久蜜臀 | 丁香激情综合五月| 精品一区二区三区蜜桃| 久久精品国产**网站演员| 亚洲午夜精品一区二区三区他趣| 久久久av毛片精品| 日韩一级片在线观看| 欧美亚洲愉拍一区二区| 91婷婷韩国欧美一区二区| 懂色一区二区三区免费观看 | 一二三区精品视频| 国产精品国产三级国产aⅴ中文| 久久久久久久久一| 欧美va亚洲va| 日韩免费观看高清完整版 | 久久精品二区亚洲w码| 三级精品在线观看| 日韩av电影天堂| 青青青伊人色综合久久| 激情综合一区二区三区| 国产呦精品一区二区三区网站| 国产精品一区二区不卡| 91视频一区二区| 欧美久久久影院| 久久亚洲精精品中文字幕早川悠里| 26uuu久久综合| 欧美韩国日本不卡| 久久综合色婷婷| 亚洲视频在线观看一区| 蜜桃一区二区三区在线| 九九国产精品视频| 在线观看www91| 日韩午夜小视频| 亚洲精品国产品国语在线app| 亚洲一区二区三区四区五区黄 | 青青草原综合久久大伊人精品优势| 青娱乐精品视频在线| 91在线观看免费视频| 日韩午夜三级在线| 亚洲综合在线电影| 国产美女视频一区| 精品无人码麻豆乱码1区2区| 91香蕉国产在线观看软件| 日韩你懂的电影在线观看| 综合久久国产九一剧情麻豆| 激情综合一区二区三区| 欧美日韩精品一区视频| 亚洲日本一区二区| 国产成人免费av在线| 欧美一级欧美一级在线播放| 国产精品超碰97尤物18| 国模大尺度一区二区三区| 在线综合视频播放| 亚洲bt欧美bt精品| 欧美日韩免费观看一区三区| 最新欧美精品一区二区三区| 成人免费视频一区二区| 欧美国产在线观看| 91丨九色丨国产丨porny|