?? pngencoder.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sun Mar 26 18:41:54 PST 2000 --><TITLE>: Class PngEncoder</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="PngEncoder.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.keypoint</FONT><BR>Class PngEncoder</H2><PRE>java.lang.Object | +--<B>com.keypoint.PngEncoder</B></PRE><HR><DL><DT>public class <B>PngEncoder</B><DT>extends java.lang.Object</DL><P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#bytePos">bytePos</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#bytesPerPixel">bytesPerPixel</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#compressionLevel">compressionLevel</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.util.zip.CRC32</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#crc">crc</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected long</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#crcValue">crcValue</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#dataPos">dataPos</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#ENCODE_ALPHA">ENCODE_ALPHA</A></B></CODE><BR> Constant specifying that alpha channel should be encoded.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#encodeAlpha">encodeAlpha</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#endPos">endPos</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#filter">filter</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#FILTER_LAST">FILTER_LAST</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#FILTER_NONE">FILTER_NONE</A></B></CODE><BR> Constants for filters</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#FILTER_SUB">FILTER_SUB</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#FILTER_UP">FILTER_UP</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#hdrPos">hdrPos</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#height">height</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.awt.Image</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#image">image</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#leftBytes">leftBytes</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#maxPos">maxPos</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#NO_ALPHA">NO_ALPHA</A></B></CODE><BR> Constant specifying that alpha channel should not be encoded.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#pngBytes">pngBytes</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#priorRow">priorRow</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#width">width</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#PngEncoder()">PngEncoder</A></B>()</CODE><BR> Class constructor</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#PngEncoder(java.awt.Image)">PngEncoder</A></B>(java.awt.Image image)</CODE><BR> Class constructor specifying Image source to encode, with no alpha channel encoding.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#PngEncoder(java.awt.Image, boolean)">PngEncoder</A></B>(java.awt.Image image, boolean encodeAlpha)</CODE><BR> Class constructor specifying Image source to encode, and whether to encode alpha or not</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#PngEncoder(java.awt.Image, boolean, int)">PngEncoder</A></B>(java.awt.Image image, boolean encodeAlpha, int which_filter)</CODE><BR> Class constructor specifying Image source to encode, whether to encode alpha or not, and which filter to use</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#PngEncoder(java.awt.Image, boolean, int, int)">PngEncoder</A></B>(java.awt.Image image, boolean encodeAlpha, int which_filter, int comp_level)</CODE><BR> Class constructor specifying Image source to encode, whether to encode alpha or not, which filter to use, and compression level.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#getCompressionLevel()">getCompressionLevel</A></B>()</CODE><BR> Retrieve compression level</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#getEncodeAlpha()">getEncodeAlpha</A></B>()</CODE><BR> Retrieve alpha encoding status.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#getFilter()">getFilter</A></B>()</CODE><BR> Retrieve filtering scheme</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#pngEncode()">pngEncode</A></B>()</CODE><BR> Creates an array of bytes that is the PNG equivalent of the current image.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#pngEncode(boolean)">pngEncode</A></B>(boolean encodeAlpha)</CODE><BR> Creates an array of bytes that is the PNG equivalent of the current image, specifying whether to encode alpha or not.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#resizeByteArray(byte[], int)">resizeByteArray</A></B>(byte[] array, int newLength)</CODE><BR> Increase or decrease the length of a byte array.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#setCompressionLevel(int)">setCompressionLevel</A></B>(int level)</CODE><BR> Set the compression level to use</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#setEncodeAlpha(boolean)">setEncodeAlpha</A></B>(boolean encodeAlpha)</CODE><BR> Set the alpha encoding on or off.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#setFilter(int)">setFilter</A></B>(int which_filter)</CODE><BR> Set the filter to use</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../com/keypoint/PngEncoder.html#setImage(java.awt.Image)">setImage</A></B>(java.awt.Image image)</CODE><BR> Set the image to be encoded</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -