📄 indexcolormodel.html
字号:
<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/BufferedImage.html">BufferedImage</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#convertToIntDiscrete(java.awt.image.Raster, boolean)">convertToIntDiscrete</A></B>(<A HREF="../../../java/awt/image/Raster.html">Raster</A> raster, boolean forceARGB)</CODE><BR> Returns a new <code>BufferedImage</code> of TYPE_INT_ARGB or TYPE_INT_RGB that has a <code>Raster</code> with pixel data computed by expanding the indices in the source <code>Raster</code> using the color/alpha component arrays of this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A></B>(int w, int h)</CODE><BR> Creates a <code>SampleModel</code> with the specified width and height that has a data layout compatible with this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#createCompatibleWritableRaster(int, int)">createCompatibleWritableRaster</A></B>(int w, int h)</CODE><BR> Creates a <code>WritableRaster</code> with the specified width and height that has a data layout (<code>SampleModel</code>) compatible with this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#finalize()">finalize</A></B>()</CODE><BR> Disposes of system resources associated with this <code>ColorModel</code> once this <code>ColorModel</code> is no longer referenced.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getAlpha(int)">getAlpha</A></B>(int pixel)</CODE><BR> Returns the alpha component for the specified pixel, scaled from 0 to 255.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getAlphas(byte[])">getAlphas</A></B>(byte[] a)</CODE><BR> Copies the array of alpha transparency components into the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getBlue(int)">getBlue</A></B>(int pixel)</CODE><BR> Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getBlues(byte[])">getBlues</A></B>(byte[] b)</CODE><BR> Copies the array of blue color components into the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getComponents(int, int[], int)">getComponents</A></B>(int pixel, int[] components, int offset)</CODE><BR> Returns an array of unnormalized color/alpha components for a specified pixel in this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getComponents(java.lang.Object, int[], int)">getComponents</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> pixel, int[] components, int offset)</CODE><BR> Returns an array of unnormalized color/alpha components for a specified pixel in this <code>ColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getComponentSize()">getComponentSize</A></B>()</CODE><BR> Returns an array of the number of bits for each color/alpha component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getDataElement(int[], int)">getDataElement</A></B>(int[] components, int offset)</CODE><BR> Returns a pixel value represented as an int in this <code>ColorModel</code> given an array of unnormalized color/alpha components.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getDataElements(int[], int, java.lang.Object)">getDataElements</A></B>(int[] components, int offset, <A HREF="../../../java/lang/Object.html">Object</A> pixel)</CODE><BR> Returns a data element array representation of a pixel in this <code>ColorModel</code> given an array of unnormalized color/alpha components.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getDataElements(int, java.lang.Object)">getDataElements</A></B>(int rgb, <A HREF="../../../java/lang/Object.html">Object</A> pixel)</CODE><BR> Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getGreen(int)">getGreen</A></B>(int pixel)</CODE><BR> Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getGreens(byte[])">getGreens</A></B>(byte[] g)</CODE><BR> Copies the array of green color components into the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getMapSize()">getMapSize</A></B>()</CODE><BR> Returns the size of the color/alpha component arrays in this <code>IndexColorModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getRed(int)">getRed</A></B>(int pixel)</CODE><BR> Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getReds(byte[])">getReds</A></B>(byte[] r)</CODE><BR> Copies the array of red color components into the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getRGB(int)">getRGB</A></B>(int pixel)</CODE><BR> Returns the color/alpha components of the pixel in the default RGB color model format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getRGBs(int[])">getRGBs</A></B>(int[] rgb)</CODE><BR> Converts data for each index from the color and alpha component arrays to an int in the default RGB ColorModel format and copies the resulting 32-bit ARGB values into the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getTransparency()">getTransparency</A></B>()</CODE><BR> Returns the transparency.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getTransparentPixel()">getTransparentPixel</A></B>()</CODE><BR> Returns the index of the transparent pixel in this <code>IndexColorModel</code> or -1 if there is no transparent pixel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/math/BigInteger.html">BigInteger</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/IndexColorModel.html#getValidPixels()">getValidPixels</A></B>()</CODE><BR> Returns a <code>BigInteger</code> that indicates the valid/invalid pixels in the colormap.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -