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

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

?? pngencoder.java

?? 無(wú)線通信的主要編程軟件,是無(wú)線通信工作人員的必備工具,關(guān)天相關(guān)教程我會(huì)在后續(xù)傳上.
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
// $Id: PngEncoder.java,v 1.2 2003/10/07 21:46:02 idgay Exp $package net.tinyos.plot;//package com.keypoint;/** * 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. * * Thanks to Jay Denny at KeyPoint Software *    http://www.keypoint.com/ * who let me develop this code on company time. * * You may contact me with (probably very-much-needed) improvements, * comments, and bug fixes at: * *   david@catcode.com * * 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. *  * 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. *  * 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 * http://www.gnu.org/copyleft/lesser.html, * * @author J. David Eisenberg * @version 1.4, 31 March 2000 */import java.awt.*;import java.awt.image.*;import java.util.*;import java.util.zip.*;import java.io.*;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 filters */    public static final int FILTER_NONE = 0;    public static final int FILTER_SUB = 1;    public static final int FILTER_UP = 2;    public static final int FILTER_LAST = 2;    protected byte[] pngBytes;    protected byte[] priorRow;    protected byte[] leftBytes;    protected Image image;    protected int width, height;    protected int bytePos, maxPos;    protected int hdrPos, dataPos, endPos;    protected CRC32 crc = new CRC32();    protected long crcValue;    protected boolean encodeAlpha;    protected int filter;    protected int bytesPerPixel;    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 };        int     i;        if (image == null)        {            return null;        }        width = image.getWidth( null );        height = image.getHeight( null );        this.image = image;        /*         * 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.     *     * @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 );

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
thepron国产精品| 欧美高清www午色夜在线视频| 免费不卡在线观看| 天天操天天综合网| 午夜视频一区在线观看| 亚洲午夜免费福利视频| 亚洲小说欧美激情另类| 亚洲国产另类精品专区| 亚洲第一在线综合网站| 亚洲第四色夜色| 亚洲成av人片在线观看无码| 亚洲成人av电影在线| 亚洲第一电影网| 日韩精品乱码免费| 奇米影视一区二区三区| 精品一区二区影视| 国产麻豆一精品一av一免费| 国产美女在线观看一区| 成人97人人超碰人人99| 91亚洲午夜精品久久久久久| 欧美性大战久久久久久久| 欧美日韩亚洲不卡| 日韩免费高清电影| 久久嫩草精品久久久精品一| 欧美国产国产综合| 亚洲人成精品久久久久| 午夜精品福利一区二区蜜股av| 午夜精品免费在线| 精品一区二区久久| 成人一区二区三区视频| 色综合天天视频在线观看| 欧美日韩免费视频| 精品国产免费一区二区三区四区 | 日韩成人伦理电影在线观看| 蜜桃视频在线观看一区二区| 懂色av中文字幕一区二区三区| 97se亚洲国产综合在线| 欧美日韩aaaaa| 久久亚洲精品国产精品紫薇| 自拍偷拍亚洲激情| 婷婷亚洲久悠悠色悠在线播放| 久久精品久久精品| 波多野结衣视频一区| 在线看不卡av| 精品伦理精品一区| 亚洲欧洲一区二区在线播放| 婷婷亚洲久悠悠色悠在线播放| 狠狠色丁香久久婷婷综合丁香| 成年人网站91| 制服丝袜中文字幕亚洲| 国产无遮挡一区二区三区毛片日本| 日韩伦理免费电影| 久久爱www久久做| 色综合天天视频在线观看| 日韩欧美国产精品一区| 亚洲视频在线一区二区| 免费成人在线观看| 色哟哟精品一区| 337p粉嫩大胆噜噜噜噜噜91av| 依依成人精品视频| 国产一区二区三区四| 欧美亚洲综合一区| 久久精品夜夜夜夜久久| 亚洲一二三专区| 成人精品一区二区三区四区 | 欧美日韩亚洲综合一区二区三区| 欧美精品一区二区三区一线天视频 | 国产精品一区二区三区99| 色婷婷一区二区三区四区| 亚洲精品在线免费观看视频| 亚洲午夜私人影院| www.久久久久久久久| 精品国产精品网麻豆系列 | 国产成人啪免费观看软件| 欧美人与z0zoxxxx视频| 综合婷婷亚洲小说| 国产精品亚洲人在线观看| 91麻豆精品国产91久久久 | 亚洲一区二区在线免费看| 国产成人综合在线| 精品精品国产高清一毛片一天堂| 亚洲综合成人在线视频| 99精品视频一区二区| 久久精品视频一区二区| 奇米精品一区二区三区四区 | 欧美日韩亚洲综合一区| 亚洲欧美日韩国产一区二区三区| 国产伦精品一区二区三区视频青涩| 欧美日本国产视频| 亚洲国产乱码最新视频| 一本到不卡精品视频在线观看| 国产精品久久毛片a| 国产最新精品精品你懂的| 日韩精品一区二区三区swag| 日韩国产欧美在线播放| 欧美日韩aaa| 午夜视频一区二区三区| 欧美四级电影网| 一区二区三区精品视频| 在线观看三级视频欧美| 亚洲欧美日韩国产中文在线| 中文字幕不卡的av| 国产精品一区二区视频| 国产视频一区在线播放| 国产成人午夜精品5599| 国产亚洲精品aa| 丁香啪啪综合成人亚洲小说| 国产欧美精品一区二区色综合| 国产精品亚洲一区二区三区在线 | 国产精品色哟哟网站| 丁香五精品蜜臀久久久久99网站| 久久精品亚洲一区二区三区浴池| 国产伦精品一区二区三区视频青涩| 亚洲精品一区二区三区影院 | 欧美日韩免费一区二区三区| 亚洲第一成人在线| 欧美一区二区三区视频免费播放 | 国产成人免费视| 国产精品视频在线看| 成人爽a毛片一区二区免费| 国产欧美日韩视频一区二区 | 91精品国产综合久久精品性色| 午夜久久电影网| 日韩一级免费观看| 国内精品久久久久影院一蜜桃| 国产亚洲va综合人人澡精品| 成人在线视频一区| 亚洲男帅同性gay1069| 欧美在线免费播放| 日本欧洲一区二区| 久久久精品国产免大香伊| 成人免费观看av| 亚洲国产精品欧美一二99| 7777精品伊人久久久大香线蕉经典版下载 | 国v精品久久久网| 最新日韩av在线| 欧美日韩www| 激情久久五月天| 亚洲三级电影全部在线观看高清| 欧洲av在线精品| 伦理电影国产精品| 中文文精品字幕一区二区| 一本大道久久a久久综合婷婷| 午夜成人在线视频| 久久久久久免费网| 欧洲精品一区二区三区在线观看| 美女国产一区二区三区| 中文子幕无线码一区tr| 欧美色倩网站大全免费| 九色综合国产一区二区三区| 综合久久国产九一剧情麻豆| 欧美精品一二三| 成人中文字幕电影| 天堂av在线一区| 亚洲国产精品高清| 欧美日韩不卡在线| 成人av影院在线| 蜜臀av一区二区三区| 亚洲欧美日韩成人高清在线一区| 欧美一区二区三区免费观看视频 | 成人午夜视频免费看| 亚洲福利一区二区三区| 久久久av毛片精品| 欧美理论片在线| 99久久精品国产网站| 另类综合日韩欧美亚洲| 亚洲免费在线视频一区 二区| 精品少妇一区二区三区在线播放| 日本久久精品电影| 国产成人自拍网| 日日摸夜夜添夜夜添亚洲女人| 国产精品丝袜91| 精品国产乱码久久久久久老虎| 欧美亚洲国产一卡| 成人丝袜高跟foot| 韩国av一区二区| 亚洲午夜久久久久久久久电影院| 日本一区二区视频在线| 欧美一区二区视频免费观看| 色香蕉久久蜜桃| 成人午夜av电影| 国产一区在线观看麻豆| 日韩精品午夜视频| 亚洲综合一区在线| 国产精品国产三级国产普通话99 | 国产人久久人人人人爽| 欧美一区二区精品久久911| 欧美亚州韩日在线看免费版国语版| 国产高清精品久久久久| 麻豆专区一区二区三区四区五区| 亚洲国产日韩综合久久精品| 国产精品不卡在线| 国产婷婷精品av在线| 日韩精品资源二区在线| 欧美一区二区三区免费视频| 欧美日韩国产一级| 欧美日韩专区在线| 在线视频中文字幕一区二区| 色综合久久久久综合体桃花网| 成人黄色在线视频|