JavaTM Platform
Standard Ed. 6

java.awt.image
�� ComponentColorModel

java.lang.Object
  �̳��� java.awt.image.ColorModel
      �̳��� java.awt.image.ComponentColorModel
������ʵ�ֵĽӿڣ�
Transparency

public class ComponentColorModel
extends ColorModel

ʹ������ֵ����ɫ�� alpha ��Ϣ��ʾΪ���������� ColorModel �࣬�����Զ���������Ԫ�ش洢ÿ��������������������� ColorSpace һ��ʹ�á�����ֵ�е���ɫ������������ ColorSpace �е���ɫ��������ͬ�������е��� alpha ������

������Щʹ�� transferType ���͵Ļ����������ر�ʾ��ʽ�ķ���������ij�������ɫ�� alpha ��������ͬ����ɫ�����洢�ں�� alpha ������������ڣ��������ǰ�档��ɫ������˳���� ColorSpace ָ����ͨ������˳��ӳ��ɫ�ռ����͵����ơ����磬���� TYPE_RGB������ 0 ��Ӧ�ں�ɫ������ 1 ��Ӧ����ɫ������ 2 ��Ӧ����ɫ��

������ʾ����Ŀ�Ķ�ִ�е�����ֵ����ɫ/alpha ������ת���ǻ��ڴ�������������һһ��Ӧ��ϵ���еġ���ʵ����ʾ����������ֵ�������з��ŵĻ��޷��ŵģ�Ҳ���������ͻ��� float �� double ���ͣ��й�ϸ����μ��������ݣ�������ȡ������������ ComponentColorModel ʵ���Ĵ������͡�������ֵ����׼����ɫ/alpha ������ת��������ѭһ���Ĺ��򡣶��� float �� double ������ת��Ϊһ�ֱ�ʶ������׼������ֵ������Ӧ������ֵ����������������ת��Ӧ��ֻ�Ǽ����ź�ƫ�ƣ�����ÿ�����������ź�ƫ�Ƴ�������������ͬ��Ӧ�����ź�ƫ�Ƴ����Ľ�����γ�һ����ɫ/alpha ����ֵ���������Ա�֤��Щֵ�䵽һ����Χ�ڡ�ͨ������ɫ�����ķ�Χ��Ϊ�� ColorSpace ��� getMinValue �� getMaxValue ��������ķ�Χ��alpha �����ķ�ΧӦΪ�� 0.0 �� 1.0��

�ô������� DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT �� DataBuffer.TYPE_INT ������ ComponentColorModel ��ʵ�����б���Ϊ�޷�������ֵ����������ֵ������ֵ����ɫ�� alpha �����е�λ�����ܲ�ͬ�ڴ��ݵ� ComponentColorModel(ColorSpace, int[], boolean, boolean, int, int) ���췽������Ӧ��ɫ�� alpha ������λ��������������£�����ٶ�����ֵ�� n λ�����Чλ�������ֵ������ n Ϊ���ݵ����췽���ķ�������Чλ���������ٶ�����ֵ�����нϸ�λ��Ϊ�㡣��ˣ�����ֵ�ķ�ΧΪ 0 �� 2n - 1�����ཫ��Щ����ֵӳ�䵽��׼����ɫ����ֵ����ʹ 0 ӳ�䵽��ÿ�������� ColorSpace �� getMinValue �����õ���ֵ��2n - 1 ӳ�䵽�� getMaxValue �õ���ֵ���������в�ͬ��ɫ����ӳ��� ComponentColorModel ��Ҫ���໯���࣬����д getNormalizedComponents(Object, float[], int) ������alpha ������ӳ��ʼ�ս� 0 ӳ�䵽 0.0���� 2n - 1 ӳ�䵽 1.0��

���ڴ����޷�������ֵ��ʵ�������������������߱�ʱ���DZ�׼������ɫ/alpha ������ʾ��ʽ����֧�֡����ȣ�����ֵ 0 ����ӳ�䵽��׼������ֵ 0.0������ֵ 2n - 1 ӳ�䵽 1.0����Σ�ColorSpace ��������ɫ��������Сֵ/���ȡֵ��Χ����Ϊ 0.0 �� 1.0 ֮�䡣����������£�������ʾ��ʽΪ��Ӧ������ n λ�����Чλ����ˣ�ÿ��������Ϊ���� 0 �� 2n - 1 ֮����޷�������ֵ������ n Ϊ�ض���������Чλ�������δ������Щ����������÷DZ�׼�������������κη��������׳� IllegalArgumentException��

�ô������� DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ������ ComponentColorModel ��ʵ�����б���Ϊ�з��ŵ� short��float �� double ֵ����������ֵ������ʵ����֧�ַDZ�׼������ɫ/alpha ������ʾ��ʽ����˽������ʾ��ʽ������������Щʵ��������֮һ�ϵ����κη��������׳� IllegalArgumentException������ʵ���ı�׼��������ȡֵ��Χȡ���ڴ������ͣ�������ʾ������ float ��������Ϊ float �������͵�������Χ������ double ��������Ϊ float �������ͣ�ͨ���� double ǿ��ת��Ϊ float �õ�����������Χ������ short ����������Ϊ -maxVal �� +maxVal������ maxVal Ϊ ColorSpace ��ÿ�������ֵ��-32767 ӳ�䵽 -maxVal��0 ӳ�䵽 0.0��32767 ӳ�䵽 +maxVal����ͨ����д getNormalizedComponents(Object, float[], int) ���������������д short ����ֵ����׼������ֵ�����š����� float �� double ��������׼������ֵ����Ϊ������Ӧ������ֵ�����಻Ӧ��ͼ������Щ�������͵��κηDZ�ʶ���š�

�ô������� DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ������ ComponentColorModel ��ʵ��ʹ����������ֵ������λ����ˣ�ʹ�� DataBuffer.TYPE_SHORT ʱ������ɫ/alpha �������� 16 λ��ʹ�� DataBuffer.TYPE_FLOAT ʱ���� 32��ʹ�� DataBuffer.TYPE_DOUBLE ʱ���� 64 λ�������췽���� ComponentColorModel(ColorSpace, int[], boolean, boolean, int, int) ��ʽ����Щ��������֮һһ��ʹ��ʱ��λ��������������ԡ�

���ܽ����ܺ������͵���ɫ/alpha ����ֵ��Ϊ���ڳ��ֵķ���ֵ�������໯ ComponentColorModel ����д�޷�������ֵ����׼����ɫ����ֵ��ӳ��ʱ����ʹ��ijһ��Χ֮����з�������ֵʱ����������ܷ����������磬�� alpha ����ָ��Ϊ��Χ 0 �� 32767������׼����Χ 0.0 �� 1.0��֮����з��� short ֵ���ܵ��²���Ԥ�ϵĽ������Ӧ�ó������ڳ���֮ǰ�ʵ������������ݣ���ʹ��ɫ�������� ColorSpace��ʹ�� ColorSpace ��� getMinValue �� getMaxValue �����õ����ı�׼����Χ�ڣ���ʹ alpha ����λ�� 0.0 �� 1.0 ֮�䡣�����ɫ�� alpha ����ֵ������Щ��Χ������ֽ���Dz�ȷ���ġ�

ʹ�õ��� int ���ر�ʾ��ʽ�ķ����׳� IllegalArgumentException������ ComponentColorModel �ķ�����Ϊ 1 �ҷ���ֵ�޷��ţ���ʹ�� DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT �� DataBuffer.TYPE_INT �Ĵ������͵ĵ�����ɫ������û�� alpha ������

ComponentColorModel ������ ComponentSampleModel��BandedSampleModel �� PixelInterleavedSampleModel һ��ʹ�ã��Թ��� BufferedImage��

������
ColorModel, ColorSpace, ComponentSampleModel, BandedSampleModel, PixelInterleavedSampleModel, BufferedImage

�ֶ�ժҪ
 
���� java.awt.image.ColorModel �̳е��ֶ�
pixel_bits, transferType
 
�ӽӿ� java.awt.Transparency �̳е��ֶ�
BITMASK, OPAQUE, TRANSLUCENT
 
���췽��ժҪ
ComponentColorModel(ColorSpace colorSpace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
          ����ָ���������� ComponentColorModel��
ComponentColorModel(ColorSpace colorSpace, int[] bits, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
          ����ָ���������� ComponentColorModel��
 
����ժҪ
 ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied)
          ǿ��ʹ��դ�������� isAlphaPremultiplied ������ָ����״̬ƥ�䣬�ٶ���ǰ���������ɴ� ColorModel ��ȷ������
 SampleModel createCompatibleSampleModel(int w, int h)
          ��ָ�����Ⱥ͸߶ȴ����� SampleModel��������� ColorModel ���ݵ����ݲ��֡�
 WritableRaster createCompatibleWritableRaster(int w, int h)
          ��ָ�����Ⱥ͸߶ȴ����� WritableRaster��������� ColorModel ���ݵ����ݲ��� (SampleModel)��
 boolean equals(Object obj)
          ������ɫģ��������ģ�ͽ�������ԱȽϡ�
 int getAlpha(int pixel)
          ����ָ�����أ����ŷ�Χ�� 0 �� 255���� alpha ������
 int getAlpha(Object inData)
          ����ָ�����أ��� 0 �� 255 ֮�����ţ��� alpha ������
 WritableRaster getAlphaRaster(WritableRaster raster)
          ���ر�ʾijͼ�񣨴����� Raster ��ȡ���� alpha ͨ���� Raster��
 int getBlue(int pixel)
          ����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 int getBlue(Object inData)
          ����ָ�����ص�����ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 int[] getComponents(int pixel, int[] components, int offset)
          ������ ColorModel ���Ѹ������صķDZ�׼����ɫ/alpha ������
 int[] getComponents(Object pixel, int[] components, int offset)
          �����ڴ� ColorModel ���Ѹ������صķDZ�׼����ɫ/alpha ���������顣
 int getDataElement(float[] normComponents, int normOffset)
          ���Ѹ�����׼����ɫ/alpha ���������������£������� int ���ͱ�ʾ�ڴ� ColorModel �е�����ֵ��
 int getDataElement(int[] components, int offset)
          ������ ColorModel �б�ʾΪ int ������ֵ���Ѹ����DZ�׼����ɫ/alpha ���������飩��
 Object getDataElements(float[] normComponents, int normOffset, Object obj)
          ���Ѹ�����׼����ɫ/alpha ���������������£����ش� ColorModel �����ص�����Ԫ�������ʾ��ʽ��
 Object getDataElements(int[] components, int offset, Object obj)
          ���Ѹ����DZ�׼����ɫ/alpha ����������£����ش� ColorModel �����ص�����Ԫ�������ʾ��ʽ��
 Object getDataElements(int rgb, Object pixel)
          ��Ĭ�� RGB ��ɫģ���и����������صı�ʾ��ʽ������£����ش� ColorModel �����ص�����Ԫ������ı�ʾ��ʽ��
 int getGreen(int pixel)
          ����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 int getGreen(Object inData)
          ����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset)
          �ڸ�����׼���������������£������Ա�׼����ʽ���ڵ�������ɫ/alpha ���������顣
 float[] getNormalizedComponents(Object pixel, float[] normComponents, int normOffset)
          �������� ColorModel �и��������صı�׼����ʽ��ɫ/alpha ���������顣
 int getRed(int pixel)
          ����ָ�����صĺ�ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 int getRed(Object inData)
          ����ָ�����صĺ�ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255��
 int getRGB(int pixel)
          ����Ĭ�ϵ� RGB ��ɫģ�͸�ʽ�����ص���ɫ/alpha ������
 int getRGB(Object inData)
          ����Ĭ�ϵ� RGB ��ɫģ�͸�ʽ�е����ص���ɫ/alpha ������
 int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset)
          ���Ѹ�����׼���������������£������ԷDZ�׼����ʽ���ڵ�������ɫ/alpha ���������顣
 boolean isCompatibleRaster(Raster raster)
          ��� raster ��� ColorModel ���ݣ��򷵻� true����������ݣ��򷵻� false��
 boolean isCompatibleSampleModel(SampleModel sm)
          ���ָ�� SampleModel �Ƿ���� ColorModel ���ݡ�
 
���� java.awt.image.ColorModel �̳еķ���
finalize, getColorSpace, getComponentSize, getComponentSize, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, hasAlpha, hashCode, isAlphaPremultiplied, toString
 
���� java.lang.Object �̳еķ���
clone, getClass, notify, notifyAll, wait, wait, wait
 

���췽����ϸ��Ϣ

ComponentColorModel

public ComponentColorModel(ColorSpace colorSpace,
                           int[] bits,
                           boolean hasAlpha,
                           boolean isAlphaPremultiplied,
                           int transparency,
                           int transferType)
����ָ���������� ComponentColorModel����ɫ��������ָ���� ColorSpace �С���֧�ֵĴ�������Ϊ DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE�������Ϊ null���� bits ����ָ��ÿ����ɫ�� alpha ��������Чλ���������������ֵ�в����� alpha ��Ϣ�����䳤������Ӧ���� ColorSpace �з�������������� alpha ��Ϣ�����䳤�ȴ��ڴ������� transferType Ϊ DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ʱ������ bits ���������hasAlpha ָʾ�Ƿ���� alpha ��Ϣ����� hasAlpha Ϊ true���򲼶�ֵ isAlphaPremultiplied ָ����ν�������ֵ�е���ɫ�� alpha �������������ֵΪ true����ٶ���ɫ�������� alpha ������ˡ�transparency ָ�������ɴ���ɫģ�ͱ�ʾ�� alpha ֵ�����Խ��ܵ� transparency ֵΪ OPAQUE��BITMASK �� TRANSLUCENT��transferType �����ڱ�ʾ����ֵ�Ļ�����������͡�

������
colorSpace - �����ɫģ�͹����� ColorSpace��
bits - ÿ����������Чλ��������Ϊ null������������£����з�������������λ������Ч����� transferType Ϊ DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ֮һ������ԣ�����������£����з�������������λ������Ч��
hasAlpha - ���Ϊ true�������ɫģ��֧�� alpha��
isAlphaPremultiplied - ���Ϊ true���� alpha Ԥ�˵ġ�
transparency - ָ�������ɴ���ɫģ�ͱ�ʾ�� alpha ֵ��
transferType - ָ�����ڱ�ʾ����ֵ�Ļ�����������͡�
�׳���
IllegalArgumentException - ��� bits ���������Ϊ null�����䳤��С����ɫ�� alpha ���������� transferType Ϊ DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT �� DataBuffer.TYPE_INT ֮һ��
IllegalArgumentException - ��� transferType ��Ϊ DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ֮һ��
������
ColorSpace, Transparency

ComponentColorModel

public ComponentColorModel(ColorSpace colorSpace,
                           boolean hasAlpha,
                           boolean isAlphaPremultiplied,
                           int transparency,
                           int transferType)
����ָ���������� ComponentColorModel����ɫ��������ָ���� ColorSpace �С���֧�ֵĴ�������Ϊ DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��ÿ����ɫ�� alpha ��������Чλ�����ֱ�Ϊ 8��16��32��16��32 �� 64����ɫ������Ϊ ColorSpace �еķ���������� hasAlpha Ϊ true������� alpha ��������� hasAlpha Ϊ true���򲼶�ֵ isAlphaPremultiplied ָ����ν�������ֵ�е���ɫ�� alpha �������������ֵΪ true����ٶ���ɫ�������� alpha ������ˡ�transparency ָ�������ɴ���ɫģ�ͱ�ʾ�� alpha ֵ�����Խ��ܵ� transparency ֵΪ OPAQUE��BITMASK �� TRANSLUCENT��transferType �����ڱ�ʾ����ֵ�Ļ�����������͡�

������
colorSpace - �����ɫģ�͹����� ColorSpace��
hasAlpha - ���Ϊ true�������ɫģ��֧�� alpha��
isAlphaPremultiplied - ���Ϊ true���� alpha Ԥ�˵ġ�
transparency - ָ�������ɴ���ɫģ�ͱ�ʾ�� alpha ֵ��
transferType - ָ�����ڱ�ʾ����ֵ�Ļ�����������͡�
�׳���
IllegalArgumentException - ��� transferType ��Ϊ DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE ֮һ��
�����°汾��ʼ��
1.4
������
ColorSpace, Transparency
������ϸ��Ϣ

getRed

public int getRed(int pixel)
����ָ�����صĺ�ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����������ֵָ��Ϊ int�����ص�ֵΪ��Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0�����ɫֵ��Ϊ 0��֮ǰ�����������

ָ���ߣ�
�� ColorModel �е� getRed
������
pixel - Ҫ���л�ȡ��ɫ���������ء�
���أ�
ָ�����أ�int ���ͣ��ĺ�ɫ������
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel �ķ���ֵΪ�з��ŵġ�

getGreen

public int getGreen(int pixel)
����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����������ֵָ��Ϊ int�����ص�ֵΪ��Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0������ɫֵ��Ϊ 0��֮ǰ�����������

ָ���ߣ�
�� ColorModel �е� getGreen
������
pixel - Ҫ���л�ȡ��ɫ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ������
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel �ķ���ֵΪ�з��ŵġ�

getBlue

public int getBlue(int pixel)
����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����������ֵָ��Ϊ int�����ص�ֵΪ��Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0������ɫֵ��Ϊ 0��֮ǰ�����������

ָ���ߣ�
�� ColorModel �е� getBlue
������
pixel - Ҫ���л�ȡ��ɫ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ������
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel �ķ���ֵΪ�з��ŵġ�

getAlpha

public int getAlpha(int pixel)
����ָ�����أ����ŷ�Χ�� 0 �� 255���� alpha ����������ֵָ��Ϊ int��

ָ���ߣ�
�� ColorModel �е� getAlpha
������
pixel - Ҫ���л�ȡ alpha ���������ء�
���أ�
ָ�����أ�int ���ͣ��� alpha ������
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel �ķ���ֵΪ�з��ŵġ�

getRGB

public int getRGB(int pixel)
����Ĭ�ϵ� RGB ��ɫģ�͸�ʽ�����ص���ɫ/alpha ���������б�Ҫ���ɽ�����ɫת�������ص�ֵ�Ƿ�Ԥ�˸�ʽ������� alpha Ԥ����ˣ��˷����Ὣ�����ɫ��������� alpha ֵΪ 0������ɫֵΪ 0���г�������

���ǣ�
�� ColorModel �е� getRGB
������
pixel - Ҫ���л�ȡ��ɫ/alpha ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ/alpha ������
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel �ķ���ֵΪ�з��ŵġ�
������
ColorModel.getRGBdefault()

getRed

public int getRed(Object inData)
����ָ�����صĺ�ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����pixel ֵ����Ϊ�������ö���������� transferType ������Ԫ�ص�����ָ�������ص�ֵΪ��Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0�����ɫֵ��Ϊ 0��֮ǰ�������������Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getRed
������
inData - Ҫ���л�ȡ��ɫ������������ transferType ������Ԫ�ص�����ָ���������ء�
���أ�
ָ�����أ�int ���ͣ��ĺ�ɫ������
�׳���
ClassCastException - ��� inData ��Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� inData �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��

getGreen

public int getGreen(Object inData)
����ָ�����ص���ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����pixel ֵ����Ϊ�������ö���������� transferType ������Ԫ�ص�����ָ�������ص�ֵ��һ����Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0������ɫֵ��Ϊ 0��֮ǰ�������������Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getGreen
������
inData - Ҫ���л�ȡ��ɫ������������ transferType ������Ԫ�ص�����ָ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ������
�׳���
ClassCastException - ��� inData ��Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� inData �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��

getBlue

public int getBlue(Object inData)
����ָ�����ص�����ɫ������ָ��������Ĭ�ϵ� RGB ColorSpace���� sRGB�������ŷ�Χ�� 0 �� 255�����б�Ҫ���ɽ�����ɫת����pixel ֵ����Ϊ�������ö���������� transferType ������Ԫ�ص�����ָ�������ص�ֵ��һ����Ԥ�ȳ˵õ�ֵ������� alpha Ԥ����ˣ��˷������ڷ���ֵ����� alpha ֵΪ 0������ɫֵ��Ϊ 0��֮ǰ�������������Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getBlue
������
inData - Ҫ���л�ȡ��ɫ������������ transferType ������Ԫ�ص�����ָ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ������
�׳���
ClassCastException - ��� inData ��Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� inData �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��

getAlpha

public int getAlpha(Object inData)
����ָ�����أ��� 0 �� 255 ֮�����ţ��� alpha ����������ֵ����Ϊ�������ô�������� transferType ������Ԫ�ص�����ָ������Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getAlpha
������
inData - Ҫ���л�ȡ alpha ������������ transferType ������Ԫ�ص�����ָ���������ء�
���أ�
ָ�����أ�int ���ͣ��� alpha ������
�׳���
ClassCastException - ��� inData ��Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� inData �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��

getRGB

public int getRGB(Object inData)
����Ĭ�ϵ� RGB ��ɫģ�͸�ʽ�е����ص���ɫ/alpha ���������б�Ҫ���ɽ�����ɫת��������ֵ����Ϊһ���������ö������ transferType ���͵�����Ԫ������ָ�������ص�ֵ�Ƿ�Ԥ�˸�ʽ������� alpha Ԥ����ˣ��˷����Ὣ�����ɫ��������� alpha ֵΪ 0������ɫֵΪ 0���г���������Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getRGB
������
inData - Ҫ���л�ȡ��ɫ/alpha ������������ transferType ������Ԫ�ص�����ָ���������ء�
���أ�
ָ�����أ�int ���ͣ�����ɫ/alpha ������
�׳���
ClassCastException - ��� inData ��Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� inData �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��
������
ColorModel.getRGBdefault()

getDataElements

public Object getDataElements(int rgb,
                              Object pixel)
��Ĭ�� RGB ��ɫģ���и����������صı�ʾ��ʽ������£����ش� ColorModel �����ص�����Ԫ������ı�ʾ��ʽ��Ȼ����Խ������鴫�ݸ� WritableRaster ����� setDataElements ��������� pixel ����Ϊ null������������顣��Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� getDataElements
������
rgb - RGB ��ɫģ�������ص�������ʾ��ʽ
pixel - ָ������
���أ�
�� ColorModel �����ص�����Ԫ�������ʾ��ʽ��
�׳���
ClassCastException - ��� pixel ��Ϊ null �Ҳ�Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� pixel �����ر�󣬲��ܱ���� ColorModel ������ֵ��
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��
������
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getComponents

public int[] getComponents(int pixel,
                           int[] components,
                           int offset)
������ ColorModel ���Ѹ������صķDZ�׼����ɫ/alpha ����������� ColorModel �ķ���ֵ�������ԷDZ�׼����ʽ��ʾ���򷵻� IllegalArgumentException������ɫ/alpha �����洢���� offset ��ͷ�� components �����У�����˷����ѷ���������Ҳ����ˡ�

���ǣ�
�� ColorModel �е� getComponents
������
pixel - ָ��Ϊ����������ֵ��
components - �����д洢�DZ�׼����ɫ/alpha �������������顣��� components ����Ϊ null������������顣
offset - components �����ƫ������
���أ�
�������顣
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ColorModel ��֧�ַDZ�׼����ʽ
ArrayIndexOutOfBoundsException - ��� components ���鲻Ϊ null �Ҳ����ر�󣬲��ܱ���������ɫ�� alpha ��������ƫ������ͷ����

getComponents

public int[] getComponents(Object pixel,
                           int[] components,
                           int offset)
�����ڴ� ColorModel ���Ѹ������صķDZ�׼����ɫ/alpha ���������顣����ֵ����Ϊһ���������ö������ transferType ���͵�����Ԫ������ָ��������� ColorModel �ķ���ֵ�������ԷDZ�׼����ʽ��ʾ���򷵻� IllegalArgumentException������ɫ/alpha �����洢���� offset ��ͷ�� components �����У�����˷����ѷ���������Ҳ����ˡ���Ϊ ComponentColorModel�������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�˷��������׳��쳣��

���ǣ�
�� ColorModel �е� getComponents
������
pixel - ������ transferType ������Ԫ�ص�����ָ��������ֵ��
components - �����д洢�DZ�׼����ɫ/alpha �������������顣��� components ����Ϊ null������������顣
offset - components �����ƫ������
���أ�
components ���顣
�׳���
IllegalArgumentException - ����� ComponentColorModel ��֧�ַDZ�׼����ʽ
UnsupportedOperationException - ��ijЩ����£������ ComponentColorModel �Ĵ������Ͳ�Ϊ���´�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT �� DataBuffer.TYPE_INT��
ClassCastException - ��� pixel ��Ϊ���� transferType �Ļ������顣
IllegalArgumentException - ��� components ���鲻Ϊ null �Ҳ����ر�󣬲��ܱ���������ɫ�� alpha ��������ƫ������ͷ�������� pixel �����ر�󣬲��ܱ���� ColorModel ������ֵ��

getUnnormalizedComponents

public int[] getUnnormalizedComponents(float[] normComponents,
                                       int normOffset,
                                       int[] components,
                                       int offset)
���Ѹ�����׼���������������£������ԷDZ�׼����ʽ���ڵ�������ɫ/alpha ���������顣�DZ�׼������Ϊ 0 �� 2n - 1 ֮����޷�������ֵ������ n Ϊ�ض�������λ������׼������Ϊ float ֵ����Щֵ���ڴ� ColorModel �� ColorSpace ����ָ����ÿ����������Сֵ�����ֵ֮�䡣����� ColorModel ����ɫ����ֵ�������÷DZ�׼����ʽ��ʾ�����׳� IllegalArgumentException����� components ����Ϊ null�������һ�������顣components ���齫���ء�����ɫ/alpha �����洢���� offset ��ͷ�� components �����У�����˷����ѷ���������Ҳ����ˡ���� components ���鲻Ϊ null �Ҳ����ر�󣬲����� offset ��ͷ����������ɫ�� alpha ���������׳� ArrayIndexOutOfBoundsException����� normComponents ���鲻���ر�󣬲��ܱ����� normOffset ��ͷ��������ɫ�� alpha ���������׳� IllegalArgumentException��

���ǣ�
�� ColorModel �е� getUnnormalizedComponents
������
normComponents - ������׼������������
normOffset - ��ʼ������׼�������� normComponents �����ƫ����
components - �� normComponents ��������������
offset - ���䴦��ʼ�洢 normComponents �� components ������
���أ�
�����DZ�׼����ɫ�� alpha ���������顣
�׳���
IllegalArgumentException - ����� ComponentColorModel ��֧�ַDZ�׼����ʽ
IllegalArgumentException - ��� normComponents �ij��ȼ�ȥ normOffset С�� numComponents

getNormalizedComponents

public float[] getNormalizedComponents(int[] components,
                                       int offset,
                                       float[] normComponents,
                                       int normOffset)
�ڸ�����׼���������������£������Ա�׼����ʽ���ڵ�������ɫ/alpha ���������顣�DZ�׼������Ϊ 0 �� 2n - 1 ֮����޷�������ֵ������ n Ϊ�ض�������λ������׼������Ϊ float ֵ����Щֵ���ڴ� ColorModel �� ColorSpace ����ָ����ÿ����������Сֵ�����ֵ֮�䡣����� ColorModel ����ɫ����ֵ�������÷DZ�׼����ʽ��ʾ�����׳� IllegalArgumentException����� normComponents ����Ϊ null�������һ�������顣normComponents ���齫���ء���ɫ/alpha �����洢���� normOffset ��ͷ�� normComponents �����У���ʹ�˷����ѷ���������Ҳ��ˡ���� normComponents ���鲻Ϊ null���Ҳ����ر�󣬲��ܱ���������ɫ�� alpha �������� normOffset ��ͷ�������׳� ArrayIndexOutOfBoundsException����� components ���鲻���ر�󣬲��ܱ����� offset ��ͷ��������ɫ�� alpha ���������׳� IllegalArgumentException��

���ǣ�
�� ColorModel �е� getNormalizedComponents
������
components - �����DZ�׼������������
offset - ��ʼ�����DZ�׼�������� components �����ƫ����
normComponents - �յ���׼������������
normOffset - ���䴦��ʼ�洢��׼�������� normComponents ������
���أ�
������׼����ɫ�� alpha ���������顣
�׳���
IllegalArgumentException - ����� ComponentColorModel ��֧�ַDZ�׼����ʽ

getDataElement

public int getDataElement(int[] components,
                          int offset)
������ ColorModel �б�ʾΪ int ������ֵ���Ѹ����DZ�׼����ɫ/alpha ���������飩��

���ǣ�
�� ColorModel �е� getDataElement
������
components - �DZ�׼����ɫ/alpha ���������顣
offset - components �����ƫ������
���أ�
��ʾΪ int ������ֵ��
�׳���
IllegalArgumentException - ����� ColorModel ����һ�����ϵķ�����
IllegalArgumentException - ����� ComponentColorModel ��֧�ַDZ�׼����ʽ

getDataElements

public Object getDataElements(int[] components,
                              int offset,
                              Object obj)
���Ѹ����DZ�׼����ɫ/alpha ����������£����ش� ColorModel �����ص�����Ԫ�������ʾ��ʽ��Ȼ����Խ������鴫�ݸ� WritableRaster ����� setDataElements ������

���ǣ�
�� ColorModel �е� getDataElements
������
components - �DZ�׼����ɫ/alpha ���������顣
offset - components ���������ƫ������
obj - �����д洢���ص�����Ԫ�������ʾ��ʽ�Ķ������ obj ����Ϊ null������������顣��� obj ��Ϊ null���������Ϊ���� transferType �Ļ������顣��� obj �����ر�󣬲��ܱ���� ColorModel ������ֵ�����׳� ArrayIndexOutOfBoundsException����Ϊ ComponentColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��
���أ�
�� ColorModel �����ص�����Ԫ�������ʾ��ʽ��
�׳���
IllegalArgumentException - ����������鲻���ر�󣬲��ܱ���������ƫ������ͷ����ɫ�� alpha ������
ClassCastException - ��� obj ��Ϊ null �Ҳ�Ϊ���� transferType �Ļ������顣
ArrayIndexOutOfBoundsException - ��� obj �����ر�󣬲��ܱ���� ColorModel ������ֵ��
IllegalArgumentException - ����� ComponentColorModel ��֧�ַDZ�׼����ʽ
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ���´�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT �� DataBuffer.TYPE_INT��
������
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getDataElement

public int getDataElement(float[] normComponents,
                          int normOffset)
���Ѹ�����׼����ɫ/alpha ���������������£������� int ���ͱ�ʾ�ڴ� ColorModel �е�����ֵ������� ColorModel ������ֵ�������õ��� int����˷������׳� IllegalArgumentException����� normComponents ���鲻���ر�󣬲��ܱ��������� normOffset ��ͷ����ɫ�� alpha ���������׳� ArrayIndexOutOfBoundsException��

���ǣ�
�� ColorModel �е� getDataElement
������
normComponents - ��׼����ɫ�� alpha ����������
normOffset - ��ʼ������ɫ�� alpha ������ normComponents ������
���أ�
�� ColorModel �ж�Ӧ��ָ�������� int ����ֵ��
�׳���
IllegalArgumentException - ����� ColorModel ������ֵ�������õ��� int ��ʾ
ArrayIndexOutOfBoundsException - ��� normComponents ���鲻���ر�󣬲��ܱ����� normOffset ��ͷ��������ɫ�� alpha ����
�����°汾��ʼ��
1.4

getDataElements

public Object getDataElements(float[] normComponents,
                              int normOffset,
                              Object obj)
���Ѹ�����׼����ɫ/alpha ���������������£����ش� ColorModel �����ص�����Ԫ�������ʾ��ʽ��Ȼ����Խ������鴫�ݸ� WritableRaster ����� setDataElements ��������� normComponents ���鲻���ر�󣬲��ܱ��������� normOffset ��ͷ����ɫ�� alpha ���������׳� ArrayIndexOutOfBoundsException����� obj ����Ϊ null�������һ�������顣��� obj ��Ϊ null����������Ϊ���� transferType �Ļ������飻�����׳� ClassCastException����� obj �����ر�󣬲��ܱ���� ColorModel ������ֵ�����׳� ArrayIndexOutOfBoundsException��

���ǣ�
�� ColorModel �е� getDataElements
������
normComponents - ��׼����ɫ�� alpha ����������
normOffset - ��ʼ������ɫ�� alpha ������ normComponents ������
obj - ���淵�ص����صĻ�����������
���أ�
Ϊ���صĻ������������ʾ��ʽ�� Object
�׳���
ClassCastException - ��� obj ��Ϊ���� transferType �Ļ�������
ArrayIndexOutOfBoundsException - ��� obj �����ر�󣬲��ܱ���� ColorModel ������ֵ������ normComponents ���鲻���ر�󣬲��ܱ����� normOffset ��ͷ��������ɫ�� alpha ����
�����°汾��ʼ��
1.4
������
WritableRaster.setDataElements(int, int, java.lang.Object), SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)

getNormalizedComponents

public float[] getNormalizedComponents(Object pixel,
                                       float[] normComponents,
                                       int normOffset)
�������� ColorModel �и��������صı�׼����ʽ��ɫ/alpha ���������顣����ֵ����Ϊ�������ô�������� transferType ������Ԫ�ص�����ָ����������ز�Ϊ���� transferType �Ļ������飬���׳� ClassCastException����� pixel �����ر�󣬲��ܱ���� ColorModel ������ֵ�����׳� ArrayIndexOutOfBoundsException����׼������Ϊ float ֵ����Щֵ���ڴ� ColorModel �� ColorSpace ����ָ����ÿ����������Сֵ�����ֵ֮�䡣��� normComponents ����Ϊ null�������һ�������顣normComponents ���齫���ء���ɫ/alpha �����洢���� normOffset ��ͷ�� normComponents �����У���ʹ�˷����ѷ���������Ҳ��ˡ���� normComponents ���鲻Ϊ null���Ҳ����ر�󣬲��ܱ���������ɫ�� alpha �������� normOffset ��ͷ�������׳� ArrayIndexOutOfBoundsException��

���ij����ּ���Է�Ĭ�Ϸ�ʽ����������ֵת��Ϊ��ɫ����ֵ��������������д�˷���������ʵ�ֵ�Ĭ��ת�������ע����������ʵ�ַ�Ĭ��ת�����κ����඼������ѭ�Դ˴����������ת�������ơ�

���ǣ�
�� ColorModel �е� getNormalizedComponents
������
pixel - ָ������
normComponents - ������׼������������
normOffset - ���䴦��ʼ�洢��׼�������� normComponents �����ƫ����
���أ�
������׼����ɫ�� alpha ���������顣
�׳���
ClassCastException - ��� pixel ��Ϊ���� transferType �Ļ�������
ArrayIndexOutOfBoundsException - ��� normComponents �����ر�󣬲��ܱ����� normOffset ��ͷ��������ɫ�� alpha ����
ArrayIndexOutOfBoundsException - ��� pixel �����ر�󣬲��ܱ���� ColorModel ������ֵ��
�����°汾��ʼ��
1.4

coerceData

public ColorModel coerceData(WritableRaster raster,
                             boolean isAlphaPremultiplied)
ǿ��ʹ��դ�������� isAlphaPremultiplied ������ָ����״̬ƥ�䣬�ٶ���ǰ���������ɴ� ColorModel ��ȷ���������Խ���ɫ raster ���ݳ��Ի���� alpha����������ݴ�����ȷ״̬����ִ���κβ����������Ҫ�Ը�����ǿ��ƥ�䣬��˷���������Ӧ�ط���һ������ isAlphaPremultiplied ��־���� ColorModel ��ʵ������Ϊ ColorModel �������໯������������Լ̳д˷�����ʵ�֣������������д�˷�����������ʹ�ò���֧�ֵ� transferType ʱ�����׳��쳣��

���ǣ�
�� ColorModel �е� coerceData
������
raster - WritableRaster ����
isAlphaPremultiplied - ����� alpha Ԥ�ˣ��򷵻� true�����򽫷��� false
���أ�
��ʾ��ǿ��ƥ�����ݵ� ColorModel ����
�׳���
NullPointerException - ��� raster Ϊ null ����Ҫ����ǿ�ơ�
UnsupportedOperationException - ����� ComponentColorModel �Ĵ������Ͳ�Ϊ������֧�ֵĴ�������֮һ��DataBuffer.TYPE_BYTE��DataBuffer.TYPE_USHORT��DataBuffer.TYPE_INT��DataBuffer.TYPE_SHORT��DataBuffer.TYPE_FLOAT �� DataBuffer.TYPE_DOUBLE��

isCompatibleRaster

public boolean isCompatibleRaster(Raster raster)
��� raster ��� ColorModel ���ݣ��򷵻� true����������ݣ��򷵻� false��

���ǣ�
�� ColorModel �е� isCompatibleRaster
������
raster - ���ڲ��Լ����Ե� Raster��
���أ�
��� raster ��� ColorModel ���ݣ��򷵻� true����������ݣ��򷵻� false��

createCompatibleWritableRaster

public WritableRaster createCompatibleWritableRaster(int w,
                                                     int h)
��ָ�����Ⱥ͸߶ȴ����� WritableRaster��������� ColorModel ���ݵ����ݲ��� (SampleModel)��

���ǣ�
�� ColorModel �е� createCompatibleWritableRaster
������
w - Ҫ������ WritableRaster �Ŀ��ȡ�
h - Ҫ������ WritableRaster �ĸ߶ȡ�
���أ�
��� ColorModel ���ݵ� WritableRaster��
������
WritableRaster, SampleModel

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int w,
                                               int h)
��ָ�����Ⱥ͸߶ȴ����� SampleModel��������� ColorModel ���ݵ����ݲ��֡�

���ǣ�
�� ColorModel �е� createCompatibleSampleModel
������
w - Ҫ������ SampleModel �Ŀ��ȡ�
h - Ҫ������ SampleModel �ĸ߶ȡ�
���أ�
��� ColorModel ���ݵ� SampleModel��
������
SampleModel

isCompatibleSampleModel

public boolean isCompatibleSampleModel(SampleModel sm)
���ָ�� SampleModel �Ƿ���� ColorModel ���ݡ�

���ǣ�
�� ColorModel �е� isCompatibleSampleModel
������
sm - ���ڲ��Լ����Ե� SampleModel��
���أ�
��� SampleModel ��� ColorModel ���ݣ��򷵻� true����������ݣ��򷵻� false��
������
SampleModel

getAlphaRaster

public WritableRaster getAlphaRaster(WritableRaster raster)
���ر�ʾijͼ�񣨴����� Raster ��ȡ���� alpha ͨ���� Raster���˷����ٶ���� ColorModel ������ Raster ���� alpha band������У��洢Ϊͼ�����ݵ����һ�� band�������������� ColorModel ��صĶ����ռ� alpha ͨ�����򷵻� null���˷�������һ���µ� Raster�����ǹ���ԭ�����������顣

���ǣ�
�� ColorModel �е� getAlphaRaster
������
raster - ������ȡ alpha ͨ���� WritableRaster��
���أ�
����ͼ��� alpha ͨ���� WritableRaster��

equals

public boolean equals(Object obj)
������ɫģ��������ģ�ͽ�������ԱȽϡ�

���ǣ�
�� ColorModel �е� equals
������
obj - Ҫ�����ɫģ�ͱȽϵĶ���
���أ�
�����ɫģ�Ͷ�����ȣ��򷵻� true���������ȣ��򷵻� false��
������
Object.hashCode(), Hashtable

JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������