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

📄 pixelgrabber.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
public int <B>getHeight</B>()</PRE><DL><DD>Get the height of the pixel buffer (after adjusting for image height). If no width was specified for the rectangle of pixels to grab then then this information will only be available after the image has delivered the dimensions.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the final height used for the pixel buffer or -1 if the height is not yet known<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/PixelGrabber.html#getStatus()"><CODE>getStatus()</CODE></A></DL></DD></DL><HR><A NAME="getPixels()"><!-- --></A><H3>getPixels</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>getPixels</B>()</PRE><DL><DD>Get the pixel buffer.  If the PixelGrabber was not constructed with an explicit pixel buffer to hold the pixels then this method will return null until the size and format of the image data is known. Since the PixelGrabber may fall back on accumulating the data in the default RGB ColorModel at any time if the source image uses more than one ColorModel to deliver the data, the array object returned by this method may change over time until the image grab is complete.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>either a byte array or an int array<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/PixelGrabber.html#getStatus()"><CODE>getStatus()</CODE></A></DL></DD></DL><HR><A NAME="getColorModel()"><!-- --></A><H3>getColorModel</H3><PRE>public <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A> <B>getColorModel</B>()</PRE><DL><DD>Get the ColorModel for the pixels stored in the array.  If the PixelGrabber was constructed with an explicit pixel buffer then this method will always return the default RGB ColorModel, otherwise it may return null until the ColorModel used by the ImageProducer is known. Since the PixelGrabber may fall back on accumulating the data in the default RGB ColorModel at any time if the source image uses more than one ColorModel to deliver the data, the ColorModel object returned by this method may change over time until the image grab is complete and may not reflect any of the ColorModel objects that was used by the ImageProducer to deliver the pixels.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the ColorModel object used for storing the pixels<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/PixelGrabber.html#getStatus()"><CODE>getStatus()</CODE></A>, <A HREF="../../../java/awt/image/ColorModel.html#getRGBdefault()"><CODE>ColorModel.getRGBdefault()</CODE></A></DL></DD></DL><HR><A NAME="setDimensions(int, int)"><!-- --></A><H3>setDimensions</H3><PRE>public void <B>setDimensions</B>(int&nbsp;width,                          int&nbsp;height)</PRE><DL><DD>The setDimensions method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setDimensions(int, int)">setDimensions</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD></DL><HR><A NAME="setHints(int)"><!-- --></A><H3>setHints</H3><PRE>public void <B>setHints</B>(int&nbsp;hints)</PRE><DL><DD>The setHints method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setHints(int)">setHints</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD></DL><HR><A NAME="setProperties(java.util.Hashtable)"><!-- --></A><H3>setProperties</H3><PRE>public void <B>setProperties</B>(<A HREF="../../../java/util/Hashtable.html">Hashtable</A>&nbsp;props)</PRE><DL><DD>The setProperties method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setProperties(java.util.Hashtable)">setProperties</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD></DL><HR><A NAME="setColorModel(java.awt.image.ColorModel)"><!-- --></A><H3>setColorModel</H3><PRE>public void <B>setColorModel</B>(<A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A>&nbsp;model)</PRE><DL><DD>The setColorModel method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setColorModel(java.awt.image.ColorModel)">setColorModel</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.awt.image.ImageConsumer</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><!-- --></A><H3>setPixels</H3><PRE>public void <B>setPixels</B>(int&nbsp;srcX,                      int&nbsp;srcY,                      int&nbsp;srcW,                      int&nbsp;srcH,                      <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A>&nbsp;model,                      byte[]&nbsp;pixels,                      int&nbsp;srcOff,                      int&nbsp;srcScan)</PRE><DL><DD>The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)">setPixels</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.awt.image.ImageConsumer</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><!-- --></A><H3>setPixels</H3><PRE>public void <B>setPixels</B>(int&nbsp;srcX,                      int&nbsp;srcY,                      int&nbsp;srcW,                      int&nbsp;srcH,                      <A HREF="../../../java/awt/image/ColorModel.html">ColorModel</A>&nbsp;model,                      int[]&nbsp;pixels,                      int&nbsp;srcOff,                      int&nbsp;srcScan)</PRE><DL><DD>The setPixels method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)">setPixels</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.awt.image.ImageConsumer</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ColorModel.html"><CODE>ColorModel</CODE></A></DL></DD></DL><HR><A NAME="imageComplete(int)"><!-- --></A><H3>imageComplete</H3><PRE>public void <B>imageComplete</B>(int&nbsp;status)</PRE><DL><DD>The imageComplete method is part of the ImageConsumer API which this class must implement to retrieve the pixels. <p> Note: This method is intended to be called by the ImageProducer of the Image whose pixels are being grabbed.  Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/image/ImageConsumer.html#imageComplete(int)">imageComplete</A></CODE> in interface <CODE><A HREF="../../../java/awt/image/ImageConsumer.html">ImageConsumer</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.awt.image.ImageConsumer</CODE></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageProducer.html#removeConsumer(java.awt.image.ImageConsumer)"><CODE>ImageProducer.removeConsumer(java.awt.image.ImageConsumer)</CODE></A></DL></DD></DL><HR><A NAME="status()"><!-- --></A><H3>status</H3><PRE>public int <B>status</B>()</PRE><DL><DD>Returns the status of the pixels.  The ImageObserver flags representing the available pixel information are returned. This method and <A HREF="../../../java/awt/image/PixelGrabber.html#getStatus()"><CODE>getStatus</CODE></A> have the same implementation, but <code>getStatus</code> is the preferred method because it conforms to the convention of naming information-retrieval methods with the form "getXXX".<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the bitwise OR of all relevant ImageObserver flags<DT><B>See Also: </B><DD><A HREF="../../../java/awt/image/ImageObserver.html"><CODE>ImageObserver</CODE></A>, <A HREF="../../../java/awt/image/PixelGrabber.html#getStatus()"><CODE>getStatus()</CODE></A></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="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PixelGrabber.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../java/awt/image/PackedColorModel.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/image/PixelInterleavedSampleModel.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>  &nbsp;&nbsp;<A HREF="PixelGrabber.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;FIELD&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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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