📄 gifencoder.html
字号:
java.io.File output)</CODE>
<BR>
Encode and write out the data contained in the <code>Image</code> to a <code>File</code> in the GIF output format ('89a' version). </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/gif4j/light/GifEncoder.html#encode(java.awt.Image, java.io.OutputStream)">encode</A></B>(java.awt.Image image, java.io.OutputStream outputStream)</CODE>
<BR>
Encode and write out the data contained in the <code>Image</code> to the output stream in the GIF89a file format. </TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="encode(com.gif4j.light.GifImage, java.io.OutputStream)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(<A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light">GifImage</A> gifImage, java.io.OutputStream outputStream) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light"><CODE>GifImage</CODE></A> to the specified output stream in the GIF image file format ('89a' version).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gifImage</CODE> - <code>GifImage</code> to encode and write out<DD><CODE>outputStream</CODE> - the specified stream to output<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If gifImage is null<DD><CODE>java.lang.NullPointerException</CODE> - If output stream is null</DL>
</DD>
</DL>
<HR>
<A NAME="encode(com.gif4j.light.GifImage, java.io.OutputStream, boolean)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(<A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light">GifImage</A> gifImage, java.io.OutputStream outputStream, boolean forceGlobalColorTableUsage) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light"><CODE>GifImage</CODE></A> to the specified output stream in the GIF file format ('89a' version).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gifImage</CODE> - <code>GifImage</code> to encode and write out<DD><CODE>outputStream</CODE> - the specified stream to output<DD><CODE>forceGlobalColorTableUsage</CODE> - force Global Color Table usage. If true local color tables from all frames will be union to one global color table. It's useful to optimize final image size (every Local Color Table takes up to 768 bytes).<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If <code>GifImage</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - If output stream is null</DL>
</DD>
</DL>
<HR>
<A NAME="encode(com.gif4j.light.GifImage, java.io.File)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(<A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light">GifImage</A> gifImage, java.io.File output) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light"><CODE>GifImage</CODE></A> to a <code>File</code> in the GIF output format ('89a' version). If there is already a <code>File</code> present, its contents are discarded.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gifImage</CODE> - <code>GifImage</code> to encode and write out<DD><CODE>output</CODE> - a <code>File</code> to be written to.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If <code>GifImage</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - If output is null<DT><B>Since:</B></DT> <DD>2.0</DD></DL>
</DD>
</DL>
<HR>
<A NAME="encode(com.gif4j.light.GifImage, java.io.File, boolean)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(<A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light">GifImage</A> gifImage, java.io.File output, boolean forceGlobalColorTableUsage) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light"><CODE>GifImage</CODE></A> to a <code>File</code> in the GIF output format ('89a' version). If there is already a <code>File</code> present, its contents are discarded.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gifImage</CODE> - <code>GifImage</code> to encode and write out<DD><CODE>output</CODE> - a <code>File</code> to be written to.<DD><CODE>forceGlobalColorTableUsage</CODE> - force Global Color Table usage. If true local color tables from all frames will be union to one global color table. It's useful to optimize final image size (every Local Color Table takes up to 768 bytes).<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If <code>GifImage</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - If output is null<DT><B>Since:</B></DT> <DD>2.0</DD></DL>
</DD>
</DL>
<HR>
<A NAME="encode(java.awt.Image, java.io.OutputStream)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(java.awt.Image image, java.io.OutputStream outputStream) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <code>Image</code> to the output stream in the GIF89a file format. Running this method is equal to running <A HREF="../../../com/gif4j/light/GifEncoder.html#encode(com.gif4j.light.GifImage, java.io.OutputStream)"><CODE>encode(com.gif4j.light.GifImage gifImage, java.io.OutputStream outputStream)</CODE></A> where <A HREF="../../../com/gif4j/light/GifImage.html" title="class in com.gif4j.light"><CODE>GifImage</CODE></A> instance contains the only one <A HREF="../../../com/gif4j/light/GifFrame.html" title="class in com.gif4j.light"><CODE>GifFrame</CODE></A> instance wrapped the specified image.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - image to encode<DD><CODE>outputStream</CODE> - the specified stream to output<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If image is null<DD><CODE>java.lang.NullPointerException</CODE> - If output stream is null</DL>
</DD>
</DL>
<HR>
<A NAME="encode(java.awt.Image, java.io.DataOutput)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(java.awt.Image image, java.io.DataOutput dataOutput) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <code>Image</code> to the specified output in the GIF89a file format.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - image to encode<DD><CODE>dataOutput</CODE> - the specified output to write<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If image is null<DD><CODE>java.lang.NullPointerException</CODE> - If output is null</DL>
</DD>
</DL>
<HR>
<A NAME="encode(java.awt.Image, java.io.File)"><!-- --></A><H3>
encode</H3>
<PRE>
public static final void <B>encode</B>(java.awt.Image image, java.io.File output) throws java.io.IOException</PRE>
<DL>
<DD>Encode and write out the data contained in the <code>Image</code> to a <code>File</code> in the GIF output format ('89a' version). If there is already a <code>File</code> present, its contents are discarded.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - image to encode and write out<DD><CODE>output</CODE> - a <code>File</code> to be written to.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If write operation fails<DD><CODE>java.lang.NullPointerException</CODE> - If <code>GifImage</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - If output is null<DT><B>Since:</B></DT> <DD>2.0</DD></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GifEncoder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="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" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../com/gif4j/light/GifFrame.html" title="class in com.gif4j.light"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="GifEncoder.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -