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

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

?? pngencoderb.java

?? 用java編寫的七星彩走勢分析圖
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
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.     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩美女精品在线| 欧美日韩国产中文| 亚洲视频免费在线| 一本大道久久a久久精二百| 久久亚洲影视婷婷| 国产夫妻精品视频| 久久久久久免费毛片精品| 国产成人亚洲综合a∨婷婷| 久久综合久久鬼色| 欧美一区日本一区韩国一区| 久久国产精品99久久久久久老狼 | 欧美精品一区二区久久婷婷 | 亚洲欧美视频在线观看| 91理论电影在线观看| 亚洲高清免费观看高清完整版在线观看| 日本乱码高清不卡字幕| 日本中文在线一区| 调教+趴+乳夹+国产+精品| 日韩欧美国产综合一区 | 一片黄亚洲嫩模| 久久夜色精品国产欧美乱极品| 国产在线一区二区综合免费视频| 久久精品夜色噜噜亚洲a∨| 色综合色综合色综合色综合色综合 | 欧美日韩中文字幕一区| 色偷偷久久一区二区三区| 日韩在线一区二区三区| 久久九九久久九九| 欧美日韩国产综合草草| 成人激情免费视频| 秋霞电影网一区二区| 亚洲婷婷综合久久一本伊一区| 欧美一区二区视频在线观看2022 | 蜜桃视频在线观看一区| 1024成人网| 国产精品污污网站在线观看| 5566中文字幕一区二区电影| 国产精品资源网| 麻豆国产精品视频| 日韩激情中文字幕| 亚洲成av人片观看| 一区二区理论电影在线观看| 国产精品视频看| 国产亚洲欧洲997久久综合| 日韩视频中午一区| 欧美老女人第四色| 久久久蜜桃精品| 日韩理论片网站| 91久久香蕉国产日韩欧美9色| 一本在线高清不卡dvd| 欧美精品第1页| 亚洲视频一区二区在线| 日韩福利电影在线观看| 精品一区二区三区影院在线午夜 | 亚洲一区av在线| 国产精品久久久久9999吃药| 欧美xxxxx裸体时装秀| 日韩亚洲欧美一区二区三区| 欧美做爰猛烈大尺度电影无法无天| 99久久99久久精品国产片果冻 | 久久精品99国产精品| 亚洲动漫第一页| 亚洲成人免费在线| 热久久一区二区| 蜜臀av国产精品久久久久| 一区二区三区日韩在线观看| 亚洲国产精品欧美一二99| 久久精品99国产精品| 91高清视频免费看| 精品久久久久久无| 亚洲一二三区在线观看| 精品伊人久久久久7777人| 91麻豆产精品久久久久久| 欧美电影免费提供在线观看| 中文字幕一区二区在线播放| 秋霞av亚洲一区二区三| 色婷婷久久综合| 中文字幕精品综合| 激情都市一区二区| 欧美视频在线一区二区三区 | 日韩欧美高清在线| 亚洲精品国产视频| 国产jizzjizz一区二区| 欧美大片一区二区| 亚洲成人精品一区二区| 97久久超碰国产精品电影| 久久久亚洲精品石原莉奈| 国产一区二三区| 国产精品久久午夜| 亚洲日本欧美天堂| 日韩黄色小视频| 久久久不卡网国产精品一区| av亚洲精华国产精华精| 日精品一区二区三区| 久久久不卡网国产精品二区| 欧洲一区在线电影| 午夜国产精品一区| 欧美一区二区精美| 捆绑紧缚一区二区三区视频| 26uuu亚洲综合色| 国产精品一二三在| 国产精品嫩草99a| 91久久久免费一区二区| 亚洲国产日韩在线一区模特| 91麻豆精品91久久久久同性| 精品中文av资源站在线观看| 国产日韩欧美精品综合| 99天天综合性| 日日夜夜精品视频免费| 久久精品亚洲乱码伦伦中文| 99在线精品一区二区三区| 午夜亚洲国产au精品一区二区| 精品国产亚洲一区二区三区在线观看| 国产精品99久久久久久久女警 | 欧美日韩日日摸| 粉嫩嫩av羞羞动漫久久久| 欧美激情一区二区在线| 欧美日韩不卡在线| 国产福利一区二区三区| 日本欧美一区二区三区| 国产婷婷色一区二区三区| 欧美日韩视频专区在线播放| 狠狠色2019综合网| 一区二区三区国产| 国产精品免费av| 精品国产三级电影在线观看| 欧美日韩中字一区| 色综合天天综合色综合av| 国产精品一级片在线观看| 男男gaygay亚洲| 性做久久久久久免费观看| 亚洲欧洲美洲综合色网| 久久久国产综合精品女国产盗摄| 日韩一区二区高清| 欧美日韩激情在线| 欧美日韩一区二区欧美激情| 在线亚洲欧美专区二区| 91丨porny丨最新| 成人午夜免费电影| 不卡视频在线看| 成人免费视频免费观看| 国产一区二区三区四区五区美女| 视频在线观看一区二区三区| 亚洲国产精品视频| 日韩激情在线观看| 韩国女主播成人在线| 成人小视频免费在线观看| 色综合久久综合网97色综合 | 欧美精品一区二区久久久| 日本一区二区在线不卡| 亚洲va欧美va国产va天堂影院| 久久99热狠狠色一区二区| 一本一道久久a久久精品综合蜜臀| 欧美日韩国产综合久久| 日韩欧美一区二区免费| 精品国产乱码久久久久久闺蜜| 久久久美女毛片| 最新热久久免费视频| 亚洲香肠在线观看| 亚洲成av人片一区二区| 精品一区中文字幕| 国产成人福利片| 91激情在线视频| 精品国产麻豆免费人成网站| 亚洲乱码精品一二三四区日韩在线| 亚洲国产精品影院| 国产a精品视频| 91精品久久久久久久99蜜桃| 亚洲国产精品ⅴa在线观看| 亚洲免费观看视频| 国产最新精品免费| 欧美日韩在线免费视频| 国产日产欧产精品推荐色 | 国产精品久久久久一区| 日本不卡一区二区三区| 成人白浆超碰人人人人| 精品av久久707| 天天影视涩香欲综合网| 丁香桃色午夜亚洲一区二区三区| 欧美精三区欧美精三区| 一区二区三区不卡视频| 国产成人在线视频网站| 日韩一级免费观看| 日日夜夜精品免费视频| 91麻豆精东视频| 国产精品麻豆欧美日韩ww| 久久精品国产99国产精品| 欧美专区亚洲专区| 中文字幕在线观看不卡| 高清在线不卡av| 国产欧美在线观看一区| 国产精品综合一区二区| 久久精品这里都是精品| 紧缚捆绑精品一区二区| 精品日韩一区二区三区免费视频| 亚洲第一激情av| 3d动漫精品啪啪1区2区免费| 午夜一区二区三区在线观看| 在线视频国内一区二区| 一区二区三区不卡在线观看|