bufferedimage.html
来自「API資料大全」· HTML 代码 · 共 1,331 行 · 第 1/5 页
HTML
1,331 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:59 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class BufferedImage</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" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <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/BufferedImage.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/awt/image/BandedSampleModel.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/image/BufferedImageFilter.html"><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="BufferedImage.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="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" CLASS="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">java.awt.image</FONT><BR>Class BufferedImage</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../java/awt/Image.html">java.awt.Image</A> | +--<B>java.awt.image.BufferedImage</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/awt/image/RenderedImage.html">RenderedImage</A>, <A HREF="../../../java/awt/image/WritableRenderedImage.html">WritableRenderedImage</A></DD></DL><HR><DL><DT>public class <B>BufferedImage</B><DT>extends <A HREF="../../../java/awt/Image.html">Image</A><DT>implements <A HREF="../../../java/awt/image/WritableRenderedImage.html">WritableRenderedImage</A></DL><P>The <code>BufferedImage</code> subclass describes an <CODE>Image</CODE> with an accessible buffer of image data. A <code>BufferedImage</code> is comprised of a <A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A> and a <A HREF="../../../java/awt/image/Raster.html"><CODE>Raster</CODE></A> of image data. The number and types of bands in the <A HREF="../../../java/awt/image/SampleModel.html"><CODE>SampleModel</CODE></A> of the <code>Raster</code> must match the number and types required by the <code>ColorModel</code> to represent its color and alpha components. All <code>BufferedImage</code> objects have an upper left corner coordinate of (0, 0). Any <code>Raster</code> used to construct a <code>BufferedImage</code> must therefore have minX=0 and minY=0.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A>, <A HREF="../../../java/awt/image/Raster.html"><CODE>Raster</CODE></A>, <A HREF="../../../java/awt/image/WritableRaster.html"><CODE>WritableRaster</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_3BYTE_BGR">TYPE_3BYTE_BGR</A></B></CODE><BR> Represents an image with 8-bit RGB color components, corresponding to a Windows-style BGR color model) with the colors Blue, Green, and Red stored in 3 bytes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_4BYTE_ABGR">TYPE_4BYTE_ABGR</A></B></CODE><BR> Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_4BYTE_ABGR_PRE">TYPE_4BYTE_ABGR_PRE</A></B></CODE><BR> Represents an image with 8-bit RGBA color components with the colors Blue, Green, and Red stored in 3 bytes and 1 byte of alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_BYTE_BINARY">TYPE_BYTE_BINARY</A></B></CODE><BR> Represents an opaque byte-packed binary image.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_BYTE_GRAY">TYPE_BYTE_GRAY</A></B></CODE><BR> Represents a unsigned byte grayscale image, non-indexed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_BYTE_INDEXED">TYPE_BYTE_INDEXED</A></B></CODE><BR> Represents an indexed byte image.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_CUSTOM">TYPE_CUSTOM</A></B></CODE><BR> Image type is not recognized so it must be a customized image.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_INT_ARGB">TYPE_INT_ARGB</A></B></CODE><BR> Represents an image with 8-bit RGBA color components packed into integer pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_INT_ARGB_PRE">TYPE_INT_ARGB_PRE</A></B></CODE><BR> Represents an image with 8-bit RGBA color components packed into integer pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_INT_BGR">TYPE_INT_BGR</A></B></CODE><BR> Represents an image with 8-bit RGB color components, corresponding to a Windows- or Solaris- style BGR color model, with the colors Blue, Green, and Red packed into integer pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_INT_RGB">TYPE_INT_RGB</A></B></CODE><BR> Represents an image with 8-bit RGB color components packed into integer pixels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_USHORT_555_RGB">TYPE_USHORT_555_RGB</A></B></CODE><BR> Represents an image with 5-5-5 RGB color components (5-bits red, 5-bits green, 5-bits blue) with no alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_USHORT_565_RGB">TYPE_USHORT_565_RGB</A></B></CODE><BR> Represents an image with 5-6-5 RGB color components (5-bits red, 6-bits green, 5-bits blue) with no alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#TYPE_USHORT_GRAY">TYPE_USHORT_GRAY</A></B></CODE><BR> Represents an unsigned short grayscale image, non-indexed).</TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.Image"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.<A HREF="../../../java/awt/Image.html">Image</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/Image.html#SCALE_AREA_AVERAGING">SCALE_AREA_AVERAGING</A>, <A HREF="../../../java/awt/Image.html#SCALE_DEFAULT">SCALE_DEFAULT</A>, <A HREF="../../../java/awt/Image.html#SCALE_FAST">SCALE_FAST</A>, <A HREF="../../../java/awt/Image.html#SCALE_REPLICATE">SCALE_REPLICATE</A>, <A HREF="../../../java/awt/Image.html#SCALE_SMOOTH">SCALE_SMOOTH</A>, <A HREF="../../../java/awt/Image.html#UndefinedProperty">UndefinedProperty</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#BufferedImage(java.awt.image.ColorModel, java.awt.image.WritableRaster, boolean, java.util.Hashtable)">BufferedImage</A></B>(<A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A> cm, <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> raster, boolean isRasterPremultiplied, <A HREF="../../../java/util/Hashtable.html">Hashtable</A> properties)</CODE><BR> Constructs a new <code>BufferedImage</code> with a specified <code>ColorModel</code> and <code>Raster</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/image/BufferedImage.html#BufferedImage(int, int, int)">BufferedImage</A></B>(int width, int height, int imageType)</CODE><BR> Constructs a <code>BufferedImage</code> of one of the predefined image types.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?