⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pngencoder.html

📁 java图形报表制作Applet
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="BEST_COMPRESSION"><!-- --></A><H3>
BEST_COMPRESSION</H3>
<PRE>
public static final int <B>BEST_COMPRESSION</B></PRE>
<DL>
<DD>The best compression level.</DL>
<HR>

<A NAME="BEST_SPEED"><!-- --></A><H3>
BEST_SPEED</H3>
<PRE>
public static final int <B>BEST_SPEED</B></PRE>
<DL>
<DD>The compression level with the best speed.</DL>
<HR>

<A NAME="COLOR_INDEXED"><!-- --></A><H3>
COLOR_INDEXED</H3>
<PRE>
public static final int <B>COLOR_INDEXED</B></PRE>
<DL>
<DD>Encode the image as a palette indexed image with maximum 256 colors. This image type takes less space and is sometimes more efficiently encoded. If the original image has more than 256 colors, the image will automatically be encoded as a 24bit truecolor image.</DL>
<HR>

<A NAME="COLOR_TRUECOLOR"><!-- --></A><H3>
COLOR_TRUECOLOR</H3>
<PRE>
public static final int <B>COLOR_TRUECOLOR</B></PRE>
<DL>
<DD>Encode the image as 24bit truecolor RGB image with 16,7 million colors.</DL>
<HR>

<A NAME="DEFAULT_COMPRESSION"><!-- --></A><H3>
DEFAULT_COMPRESSION</H3>
<PRE>
public static final int <B>DEFAULT_COMPRESSION</B></PRE>
<DL>
<DD>The default compression level.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="PngEncoder()"><!-- --></A><H3>
PngEncoder</H3>
<PRE>
public <B>PngEncoder</B>()</PRE>
<DL>
<DD>Creates a new PngEncoder for truecolor images and default compression.</DL>
<HR>

<A NAME="PngEncoder(int)"><!-- --></A><H3>
PngEncoder</H3>
<PRE>
public <B>PngEncoder</B>(int&nbsp;colorType)</PRE>
<DL>
<DD>Creates a new PngEncoder with the specified color type and default compression.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>colorType</CODE> - COLOR_TRUECOLOR or COLOR_INDEXED.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - If the color type is invalid.</DL>
</DD>
</DL>
<HR>

<A NAME="PngEncoder(int, int)"><!-- --></A><H3>
PngEncoder</H3>
<PRE>
public <B>PngEncoder</B>(int&nbsp;colorType,                  int&nbsp;compression)</PRE>
<DL>
<DD>Creates a new PngEncoder with the specified color type and compression. The less compression, the faster the encoding will be and larger the image.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>colorType</CODE> - COLOR_TRUECOLOR, or COLOR_INDEXED.<DD><CODE>compression</CODE> - The compression level (0-9 or DEFAULT_COMPRESSION, BEST_SPEED, BEST_COMPRESSION).<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - If the color type or compression level is invalid.</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="encode(java.awt.Image, java.io.OutputStream)"><!-- --></A><H3>
encode</H3>
<PRE>
public void <B>encode</B>(java.awt.Image&nbsp;image,                   java.io.OutputStream&nbsp;out)            throws java.io.IOException</PRE>
<DL>
<DD>Encodes an image to an output stream as a PNG image.  It does not close the output stream, this must be done by the caller.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - the buffered image to encode.<DD><CODE>out</CODE> - the output stream to write the encoded data to.</DL>
</DD>
</DL>
<HR>

<A NAME="getColorType()"><!-- --></A><H3>
getColorType</H3>
<PRE>
public int <B>getColorType</B>()</PRE>
<DL>
<DD>Gets the current image type.<DD><DL>
<DT><B>Returns:</B><DD>COLOR_INDEXED or COLOR_TRUECOLOR.</DL>
</DD>
</DL>
<HR>

<A NAME="getVersion()"><!-- --></A><H3>
getVersion</H3>
<PRE>
public static java.lang.String <B>getVersion</B>()</PRE>
<DL>
<DD>Gets the version number.</DL>
<HR>

<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[]&nbsp;argv)</PRE>
<DL>
<DD>Prints out the version number.</DL>
<HR>

<A NAME="setColorType(int)"><!-- --></A><H3>
setColorType</H3>
<PRE>
public void <B>setColorType</B>(int&nbsp;colorType)</PRE>
<DL>
<DD>Sets the encoded image type. Palette indexed images are smaller but can contain a maximum of 256 colors. Truecolor images uses one byte per pixel and can contain 16,7 million colors, but are larger.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>colorType</CODE> - COLOR_INDEXED or COLOR_TRUECOLOR.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - If the color type is invalid.</DL>
</DD>
</DL>
<HR>

<A NAME="setCompression(int)"><!-- --></A><H3>
setCompression</H3>
<PRE>
public void <B>setCompression</B>(int&nbsp;level)</PRE>
<DL>
<DD>Sets the image compression level. The better the compression the smaller the image and longer the encoding time.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>level</CODE> - 0-9 or DEFAULT_COMPRESSION, BEST_SPEED, or BEST_COMPRESSION.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - If the compression level is invalid.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/objectplanet/chart/PieChartApplet.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PngEncoder.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -