|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.awt.image.ColorModel | +--java.awt.image.ComponentColorModel
À̰ÍÀº ColorModel
Ŭ·¡½ºÀÇ 1 °³·Î, Çȼ¿Ä¡¸¦ Ãë±ÞÇÕ´Ï´Ù. ÀÌ Çȼ¿Ä¡´Â »öÁ¤º¸ ¹× ¾ËÆÄ Á¤º¸¸¦ °³º°ÀÇ »ùÇ÷μ Ç¥ÇöÇØ, °¢ »ùÇÃÀ» °³º°ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò¿¡ ÀúÀåÇÕ´Ï´Ù. ÀÌ Å¬·¡½º´Â ÀÓÀÇÀÇ ColorSpace
¿Í ÇÔ²² »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Çȼ¿Ä¡¿¡ Æ÷ÇÔÇÑ Ä®¶ó »ùÇÃÀÇ ¼ö´Â ColorSpace
¿¡ ÀÖ´Â »ö¼ººÐÀÇ ¼ö·Î µ¿ÀÏÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. ¾ËÆÄ »ùÇÃÀº ´ÜÀÏ¿¡¼µµ ±¦Âú½À´Ï´Ù.
transferType
ÇüÀÇ ¿ø½ÃÀû ¹è¿ Çȼ¿ Ç¥ÇöÀ» »ç¿ëÇÏ´Â ¸Þ¼ÒµåÀÇ °æ¿ì, ¹è¿ÀÇ ±æÀÌ´Â Ä®¶ó »ùÇà ¹× ¾ËÆÄ »ùÇÃÀÇ ¼ö·Î µ¿ÀÏÇØÁý´Ï´Ù. ¹è¿¿¡´Â Ä®¶ó »ùÇÃÀÌ ÃÖÃÊ·Î ÀúÀåµÇ¾î ¾ËÆÄ »ùÇÃÀÌ ÀÖÀ¸¸é, ±× ÈÄ¿¡ ÀúÀåµË´Ï´Ù. Ä®¶ó »ùÇÃÀÇ ¼ø¼´Â ColorSpace
·Î ÁöÁ¤ÇÕ´Ï´Ù. Åë»ó, ÀÌ ¼ø¼´Â Ä®¶ó ½ºÆäÀ̽º ŸÀÔÀÇ À̸§À» ¹Ý¿µÇÕ´Ï´Ù. ¿¹¸¦ µé¾î,TYPE_RGB
ÀÇ À妽º 0 Àº »¡°, À妽º 1 Àº ÃÊ·Ï, ±×¸®°í À妽º 2 ´Â ÆÄ¶ûÀÌ µË´Ï´Ù.
Ç¥½Ã, ȤÀº À̹ÌÁö 󸮸¦ À§Çؼ(¶§¹®¿¡) Çȼ¿Ä¡¸¦ »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ¸·Î º¯È¯Çϴ ó¸®´Â »ùÇðú ¼ººÐÀÇ 1 ´ë 1 ´ëÀÀÀÌ µË´Ï´Ù. ComponentColorModel
ÀÇ ÀνºÅϽºÀÇ ÀÛ¼º¿¡ »ç¿ëÇÏ´Â Àü¼ÛÇü¿¡ ÀÀÇØ, ÀνºÅϽº°¡ ºÎÈ£ ÷ºÎ³ª ºÎÈ£ ¾øÀ½Àΰ¡, ¹× Á¤¼öÇü, float, double ÀÇ ¾î¶² °ÍÀΰ¡ (ÀÚ¼¼ÇÑ °ÍÀº ÀÌÈĸ¦ ÂüÁ¶)¿¡ ÀÇÇØ, Çȼ¿ »ùÇÃÄ¡´Â Ç¥ÇöµË´Ï´Ù. »ùÇÃÄ¡¸¦ »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ¸·Î º¯È¯Çϴ ó¸®´Â ƯÁ¤ÀÇ ±ÔÄ¢¿¡ µû¸¦ Çʿ䰡 ÀÖ½À´Ï´Ù. float ¹× double ÀÇ »ùÇÃÀÇ °æ¿ì´Â Ç׵ȯÀ¸·Î, Ç¥ÁØÈ ¼ººÐÄ¡°¡ ´ëÀÀÇÏ´Â »ùÇÃÄ¡¿Í µ¿ÀÏÇØÁý´Ï´Ù. Á¤¼ö »ùÇÃÀÇ °æ¿ì´Â ´Ü¼øÇÑ ½ºÄÉÀÏ ¹× ¿ÀÇÁ¼Â(offset)¸¸ÀÇ º¯È¯ÀÔ´Ï´Ù. ½ºÄÉÀÏ Á¤¼ö¿Í ¿ÀÇÁ¼Â(offset) Á¤¼ö´Â ¼ººÐ ¸¶´Ù ´Ù¸¥ ÀÏÀÌ ÀÖ½À´Ï´Ù. ½ºÄÉÀÏ Á¤¼ö¿Í ¿ÀÇÁ¼Â(offset) Á¤¼ö¸¦ Àû¿ëÇÑ °á°ú´Â ƯÁ¤ÀÇ ¹üÀ§¿¡ È®½ÇÈ÷ µé¾î°¡´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ °ª¼¼Æ®ÀÔ´Ï´Ù. Åë»ó, »ö¼ººÐÀÇ ¹üÀ§´Â ColorSpace
Ŭ·¡½ºÀÇ getMinValue
¸Þ¼Òµå¿Í getMaxValue
¸Þ¼Òµå¿¡ ÀÇÇØ Á¤Àǵ˴ϴÙ. ¾ËÆÄ ¼ººÐÀÇ ¹üÀ§´Â 0.0 ~ 1.0 ÀÔ´Ï´Ù.
Àü¼ÛÇü DataBuffer.TYPE_BYTE
,DataBuffer.TYPE_USHORT
, ¹× DataBuffer.TYPE_INT
À¸·Î ÀÛ¼ºµÈ ComponentColorModel
ÀÇ ÀνºÅϽº´Â ºÎÈ£ ¾øÀ½ Á¤¼öÄ¡·Î¼ ´Ù·ç¾îÁö´Â Çȼ¿ »ùÇÃÄ¡¸¦ °¡Áý´Ï´Ù. Çȼ¿Ä¡ÀÇ »ö»ùÇðú ¾ËÆÄ »ùÇÃÀÇ ºñÆ®¼ö´Â ComponentColorModel(ColorSpace, int[], boolean, boolean, int, int)
constructor·Î °Ç³×Áø, ´ëÀÀÇÏ´Â Ä®¶ó »ùÇà ¹× ¾ËÆÄ »ùÇÃÀÇ ºñÆ®¼ö¿Í ´Ù¸¥ °æ¿ì°¡ ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì, ÀÌ Å¬·¡½º´Â »ùÇÃÄ¡ÀÇ ÃÖÇÏÁ¤µµ n ºñÆ®°¡ ¼ººÐÀÇ °ªÀ» º¸°ü À¯ÁöÇϰí ÀÖ´Ù°í º¾´Ï´Ù. ÀÌ ¶§ n ´Â constructor·Î °Ç³×Áø ¼ººÐÀÇ À¯È¿ ºñÆ®ÀÇ ¼öÀÔ´Ï´Ù. ¶Ç, º¸´Ù »óÀ§¿¡ ÀÖ´Â »ùÇÃÄ¡ÀÇ ÀÓÀÇÀÇ ºñÆ®¿¡ ´ëÇØ¼´Â ¸ðµÎ 0 ÀÌ´Ù°í º¸¿©Áý´Ï´Ù. µû¶ó¼, »ùÇÃÄ¡ÀÇ ¹üÀ§´Â 0 ~ 2n - 1 ÀÌ µË´Ï´Ù. ÀÌ Å¬·¡½º´Â ÀÌ·¯ÇÑ »ùÇÃÄ¡¸¦ Ç¥ÁØÈ µÈ »ö¼ººÐÄ¡¿¡ MAP ÇϹǷÎ, 0 Àº ColorSpace
Ŭ·¡½ºÀÇ getMinValue
¸Þ¼Òµå·ÎºÎÅÍ ÃëµæÇÑ °ª¿¡ MAP µÇ¾î 2n - 1 Àº getMaxValue
¸Þ¼Òµå·ÎºÎÅÍ ÃëµæÇÑ °ª¿¡ MAP µË´Ï´Ù. ´Ù¸¥ Ä®¶ó »ùÇÃÀÇ ¸ÅÇÎÀÇ ComponentColorModel
À» ÀÛ¼ºÇÏ·Á¸é , ÀÌ Å¬·¡½ºÀÇ ¼ºê Ŭ·¡½ºÈÇØ,getNormalizedComponents(Object, float[], int)
¸Þ¼Òµå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ¾ËÆÄ »ùÇÃÀÇ °æ¿ì, Ç×»ó 0 ÀÌ 0.0 ¿¡, 2n - 1 ÀÌ 1.0 ¿¡ MAP µË´Ï´Ù.
ºÎÈ£ ¾øÀ½ »ùÇÃÄ¡¸¦ °¡Áö´Â ÀνºÅϽº¿¡¼´Â ´ÙÀ½ÀÇ 2 °³ÀÇ Á¶°ÇÀÌ Ã¤¿öÁö´Â °æ¿ì¿¡°Ô¸¸, Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐ Ç¥ÇöÀÌ ¼Æ÷Æ®µË´Ï´Ù. 1 krÀº »ùÇÃÄ¡ 0 ÀÌ Ç¥ÁØÈ ¼ººÐÄ¡ 0.0 ¿¡ MAP µÇ¾î »ùÇÃÄ¡ 2n - 1 ÀÌ 1.0 ¿¡ MAP µÇ´Â °ÍÀÔ´Ï´Ù. ÀÌÁ¦(¹ú½á) 1 krÀº ColorSpace
ÀÇ ¸ðµç »ö¼ººÐÀÇ ÃÖ¼Ò/ÃÖ´ë ¹üÀ§°¡ 0.0 ~ 1.0 ÀÎ °ÍÀÔ´Ï´Ù. ÀÌ °æ¿ì, ¼ººÐ Ç¥ÇöÀº ´ëÀÀÇÏ´Â »ùÇÃÀÇ ÃÖÇÏÁ¤µµ n ºñÆ®°¡ µË´Ï´Ù. µû¶ó¼, °¢ ¼ººÐÀº 0 À¸·Î 2n - 1 ÀÇ »çÀÌÀÇ ºÎÈ£ ¾øÀ½ Á¤¼öÄ¡ÀÔ´Ï´Ù. ÀÌ ¶§ n ´Â ƯÁ¤ÀÇ ¼ººÐÀÇ À¯È¿ ºñÆ®¼öÀÔ´Ï´Ù. ÀÌ·¯ÇÑ Á¶°ÇÀÌ Ã¤¿öÁöÁö ¾ÊÀº °æ¿ì´Â ºñÇ¥ÁØÈ ¼ººÐÀÇ Àμö¸¦ ÃëÇÏ´Â ÀÓÀÇÀÇ ¸Þ¼Òµå°¡ IllegalArgumentException
¸¦ ½½·Î¿ì ÇÕ´Ï´Ù.
Àü¼ÛÇü DataBuffer.TYPE_SHORT
,DataBuffer.TYPE_FLOAT
, ¹× DataBuffer.TYPE_DOUBLE
·Î ÀÛ¼ºµÈ ComponentColorModel
ÀÇ ÀνºÅϽº´Â ºÎÈ£ ÷ºÎ short, float, ¶Ç´Â double Ä¡·Î¼ ´Ù·ç¾îÁö´Â Çȼ¿ »ùÇÃÄ¡¸¦ º¸°ü À¯ÁöÇÕ´Ï´Ù. ÀÌ·¯ÇÑ ÀνºÅϽº´Â Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐ Ç¥ÇöÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê±â ¶§¹®¿¡, ÀνºÅϽº¸¦ È£ÃâÇϸé(ÀÚ), Àμö¿¡ ÀÌ·¯ÇÑ Ç¥ÇöÀ» ÃëÇÏ´Â ¸Þ¼Òµå´Â IllegalArgumentException
¸¦ ½½·Î¿ì ÇÕ´Ï´Ù. ÀÌ Å¬·¡½ºÀÇ ÀνºÅϽºÀÇ Ç¥ÁØÈ ¼ººÐÄ¡´Â ´ÙÀ½ÀÇ Àü¼ÛÇü¿¡ ´ëÀÀÇÑ ¹üÀ§¸¦ °¡Áý´Ï´Ù. float »ùÇÃÀº float µ¥ÀÌÅÍÇüÀÇ Àü¹üÀ§, double »ùÇÃÀº float µ¥ÀÌÅÍÇüÀÇ Àü¹üÀ§ (double ¸¦ float ¿¡ ij½ºÆ® ÇÑ °á°ú), short »ùÇÃÀº °ÅÀÇ -maxVal ~ +maxVal ÀÔ´Ï´Ù. maxVal ´Â ColorSpace
ÀÇ ¼ººÐ ±ÙóÀÇ ÃÖ´ëÄ¡ÀÔ´Ï´Ù (-32767 °¡ -maxVal ¿¡, 0 ÀÌ 0.0 ¿¡, 32767 ÀÌ +maxVal ¿¡ MAP µË´Ï´Ù). ¼ºê Ŭ·¡½º´Â getNormalizedComponents(Object, float[], int)
¸Þ¼Òµå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÏ´Â °ÍÀ¸·Î½á, short »ùÇÃÄ¡ÀÇ Ç¥ÁØÈ ¼ººÐÄ¡¿¡ÀÇ ½½Ä¶¸µÀ» ¿À¹ö¶óÀ̵å(override) ÇÏ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù. float »ùÇðú double »ùÇÿ¡ ´ëÇØ¼´Â Ç¥ÁØÈ ¼ººÐÄ¡°¡ ´ëÀÀÇÏ´Â »ùÇÃÄ¡¿Í µ¿ÀÏÇØÁ®, ¼ºê Ŭ·¡½º´Â ÀÌ·¯ÇÑ Àü¼ÛÇüÀÇ ¾î´À ºñÇ׵ȯ½½Ä¶¸µµµ Ãß°¡ÇÏÁö ¾Ê½À´Ï´Ù.
Àü¼ÛÇü DataBuffer.TYPE_SHORT
,DataBuffer.TYPE_FLOAT
, ¹× DataBuffer.TYPE_DOUBLE
·Î ÀÛ¼ºµÈ ComponentColorModel
ÀÇ ÀνºÅϽº´Â ¸ðµç »ùÇÃÄ¡ÀÇ ¸ðµç ºñÆ®¸¦ »ç¿ëÇÕ´Ï´Ù. µû¶ó¼, ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀº DataBuffer.TYPE_SHORT
ÀÇ °æ¿ì´Â 16 ºñÆ®,DataBuffer.TYPE_FLOAT
ÀÇ °æ¿ì´Â 32 ºñÆ®,DataBuffer.TYPE_DOUBLE
ÀÇ °æ¿ì´Â 64 ºñÆ®¸¦ º¸°ü À¯ÁöÇÕ´Ï´Ù. ComponentColorModel(ColorSpace, int[], boolean, boolean, int, int)
Çü½ÄÀÇ constructor ÀÌ ÀÌ·¯ÇÑ Àü¼ÛÇüÀ¸·Î »ç¿ëµÇ´Â °æ¿ì, ºñÆ® ¹è¿ Àμö´Â ¹«½ÃµË´Ï´Ù.
Ä®¶ó »ùÇÃÄ¡¿Í ¾ËÆÄ »ùÇÃÄ¡°¡ Ç¥Çö ÇÏ´Â ¼ººÐÄ¡·Î¼ ÀûÀýÈ÷ ÇØ¼®µÇÁö ¾Ê´Â °Íµµ ÀÖ½À´Ï´Ù. À̰ÍÀº ComponentColorModel
ÀÌ, ºÎÈ£ ¾øÀ½ »ùÇÃÄ¡ÀÇ Ç¥ÁØÈ µÈ »ö¼ººÐÄ¡¿¡ÀÇ ¸ÅÇÎÀ» ¿À¹ö¶óÀ̵å(override) Çϱâ À§ÇÑ(ÇØ) ¼ºê Ŭ·¡½ºÈ µÇ°í ÀÖ´ÂÁö ƯÁ¤ÀÇ ¹üÀ§¿ÜÀÇ ºÎÈ£ ÷ºÎ »ùÇÃÄ¡°¡ »ç¿ëµÇ°í ÀÖ´Â °æ¿ì¿¡ ÀϾ´Ï´Ù. ¿¹¸¦ µé¾î, ¾ËÆÄ ¼ººÐÀ» 0 ~ 32767 ÀÇ ¹üÀ§¿¡ ¾ø´Â ºÎÈ£ ÷ºÎ short Ä¡, Ç¥ÁØÈ ¹üÀ§ 0.0 ~ 1.0 À¸·Î¼ ÁöÁ¤Çϸé(ÀÚ), ¿¹±âÄ¡ ¾ÊÀº °á°ú°¡ µË´Ï´Ù. »ö¼ººÐÀÌ ColorSpace
ÀÇ Ç¥ÁØÈ ¹üÀ§ (ColorSpace
Ŭ·¡½ºÀÇ getMinValue
¸Þ¼Òµå¿Í getMaxValue
¸Þ¼Òµå¸¦ »ç¿ëÇØ Ãëµæ) ³»¿¡ ÀÖ¾î, ¾ËÆÄ ¼ººÐÀÌ 0.0 ~ 1.0 À̵µ·Ï(µíÀÌ), Ç¥ÇöÀÇ Àü¿¡ ¾îÇø®ÄÉÀ̼ÇÃø¿¡¼ Çȼ¿ µ¥ÀÌÅ͸¦ ÀûÀýÈ÷ ½½Ä¶¸µ ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. »ö¼ººÐÄ¡ ¶Ç´Â ¾ËÆÄ ¼ººÐÄ¡°¡ ¹üÀ§¿Ü¿¡ ÀÖ´Â °æ¿ì¿¡´Â Ç¥Çö °á°ú¸¦ È®Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù.
ComponentColorModel
ÀÇ ¼ººÐ¼ö°¡ 1 À¸·Î ÄÄÆÛ³ÍÆ®Ä¡°¡ ºÎÈ£ ¾øÀ½ (Áï, Àü¼ÛÇü DataBuffer.TYPE_BYTE
,DataBuffer.TYPE_USHORT
, ¶Ç´Â DataBuffer.TYPE_INT
¸¦ »ç¿ëÇÏ´Â ´ÜÀÏÀÇ »ö¼ººÐ¸¸À¸·Î, ¾ËÆÄ ¼ººÐÀÌ ¾ø´Ù) ÀÌ¿ÜÀÇ °æ¿ì, ´ÜÀÏÀÇ int Çȼ¿ Ç¥ÇöÀ» »ç¿ëÇÏ´Â ¸Þ¼Òµå´Â IllegalArgumentException
¸¦ ½½·Î¿ì ÇÕ´Ï´Ù.
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 º¯¼ö·Î ÁöÁ¤µÈ »óÅÂ¿Í ÀÏÄ¡Çϵµ·Ï(µíÀÌ) ÇÕ´Ï´Ù. |
SampleModel |
createCompatibleSampleModel (int w,
int h)
ÁöÁ¤µÈ Æø ¹× ³ôÀÌ·Î, ÀÌ ColorModel ¿Í ȣȯ¼ºÀÌ ÀÖ´Â µ¥ÀÌÅÍ ·¹À̾ƿôÀ» °¡Áö´Â SampleModel ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
WritableRaster |
createCompatibleWritableRaster (int w,
int h)
ÁöÁ¤µÈ Æø ¹× ³ôÀÌ·Î, ÀÌ ColorModel ¿Í ȣȯ¼ºÀÌ ÀÖ´Â µ¥ÀÌÅÍ ·¹À̾ƿô (SampleModel )À» °¡Áö´Â WritableRaster ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
boolean |
equals (Object obj)
ÀÌ Ä®¶ó ¸ðµ¨°ú ´Ù¸¥ Ä®¶ó ¸ðµ¨ÀÌ µ¿ÀÏÇÑÁö ¾î¶²Áö¸¦ ºñ±³ÇÕ´Ï´Ù. |
int |
getAlpha (int pixel)
ÁöÁ¤µÈ Çȼ¿ÀÇ ¾ËÆÄ ¼ººÐÀ», 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. |
int |
getAlpha (Object inData)
ÁöÁ¤µÈ Çȼ¿ÀÇ ¾ËÆÄ ¼ººÐÀ» 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. |
WritableRaster |
getAlphaRaster (WritableRaster raster)
À̹ÌÁöÀÇ ¾ËÆÄ ä³ÎÀ» Ç¥ÇöÇÏ´Â Raster ¸¦, ÀÔ·ÂµÈ 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 |
int[] |
getComponents (Object pixel,
int[] components,
int offset)
ÀÌ ColorModel |
int |
getDataElement (float[] normComponents,
int normOffset)
Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» ÁöÁ¤ÇØ, ÀÌ ColorModel ¿¡ int ·Î¼ ³ªÅ¸³»Áö´Â Çȼ¿Ä¡¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getDataElement (int[] components,
int offset)
ºñÁ¤±ÔÈµÈ »ö¼ººÐ ȤÀº ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» ÁöÁ¤ÇØ, ÀÌ ColorModel ÀÇ int ·Î¼ Ç¥ÇöµÇ´Â Çȼ¿Ä¡¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Object |
getDataElements (float[] normComponents,
int normOffset,
Object obj)
Ç¥ÁØÈ»ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» ÁöÁ¤ÇØ, ÀÌ ColorModel ÀÇ Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» µ¹·ÁÁÝ´Ï´Ù. |
Object |
getDataElements (int[] components,
int offset,
Object obj)
ºñÁ¤±ÔÈµÈ »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» ÁöÁ¤ÇØ, ÀÌ ColorModel ÀÇ Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» µ¹·ÁÁÝ´Ï´Ù. |
Object |
getDataElements (int rgb,
Object pixel)
µðÆúÆ®ÀÇ RGB Ä®¶ó ¸ðµ¨ÀÇ int Çȼ¿ Ç¥ÇöÀ» ÁöÁ¤ÇØ, ÀÌ 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)
Ç¥ÁØÈ ¼ººÐ ¹è¿À» ÁöÁ¤ÇØ, ºñÇ¥ÁØÈ Çü½Ä¿¡¼ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. |
float[] |
getNormalizedComponents (Object pixel,
float[] normComponents,
int normOffset)
ÀÌ ColorModel ÀÇ ÁöÁ¤µÈ Çȼ¿¿¡ ´ëÇØ, Ç¥ÁØÈ Çü½Ä¿¡¼ »ö¼ººÐ°ú ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. |
int |
getRed (int pixel)
ÁöÁ¤µÈ Çȼ¿ÀÇ »¡° ¼ººÐÀ» µðÆúÆ®ÀÇ RGB ColorSpace (sRGB)·Î 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. |
int |
getRed (Object inData)
ÁöÁ¤µÈ Çȼ¿ÀÇ Àû»ö ¼ººÐÀ», µðÆúÆ®ÀÇ RGB ColorSpace (sRGB)·Î 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. |
int |
getRGB (int pixel)
µðÆúÆ®ÀÇ RGB Ä®¶ó ¸ðµ¨ Çü½Ä¿¡¼, Çȼ¿ÀÇ »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» µ¹·ÁÁÝ´Ï´Ù. |
int |
getRGB (Object inData)
µðÆúÆ®ÀÇ RGB Ä®¶ó ¸ðµ¨ Çü½Ä¿¡¼, Çȼ¿ÀÇ »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» µ¹·ÁÁÝ´Ï´Ù. |
int[] |
getUnnormalizedComponents (float[] normComponents,
int normOffset,
int[] components,
int offset)
Ç¥ÁØÈ ¼ººÐ ¹è¿À» ÁöÁ¤ÇØ, ºñÇ¥ÁØÈ Çü½Ä¿¡¼ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. |
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 |
»ý¼ºÀÚÀÇ »ó¼¼ |
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
¹è¿Àº »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐ¸¶´ÙÀÇ À¯È¿ ºñÆ®¼ö¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çȼ¿Ä¡¿¡ ¾ËÆÄ Á¤º¸°¡ ¾ø´Â °æ¿ì, ¹è¿ÀÇ ±æÀÌ´Â Àû¾îµµ ColorSpace
¿¡ ÀÖ´Â ¼ººÐ¼ö°¡ µÇ¾î, ¾ËÆÄ Á¤º¸°¡ ÀÖ´Â °æ¿ì´Â ¼ººÐ¼öº¸´Ù 1 Ä¿Áý´Ï´Ù. transferType
°¡ DataBuffer.TYPE_SHORT
,DataBuffer.TYPE_FLOAT
, ¶Ç´Â DataBuffer.TYPE_DOUBLE
ÀÇ °æ¿ì,bits
¹è¿ Àμö´Â ¹«½ÃµË´Ï´Ù. hasAlpha
´Â ¾ËÆÄ Á¤º¸ÀÇ À¯¹«¸¦ ³ªÅ¸³À´Ï´Ù. hasAlpha
°¡ true ÀÇ °æ¿ì, boolean ÇüÀÇ isAlphaPremultiplied
´Â Çȼ¿Ä¡¿¡ ÀÖ´Â Ä®¶ó »ùÇà ¹× ¾ËÆÄ »ùÇÃÀ» Æò°¡ÇÏ´Â ¹æ¹ýÀ» ÁöÁ¤ÇÕ´Ï´Ù. boolean °¡ true ÀÇ °æ¿ì´Â Ä®¶ó »ùÇÃÀº ¾ËÆÄ »ùÇðú °ö¼ÀµÇ¾ú´Ù°í º¸¿©Áý´Ï´Ù. transparency
´Â ÀÌ Ä®¶ó ¸ðµ¨·Î Ç¥ÇöÇÒ ¼ö ÀÖ´Â ¾ËÆÄÄ¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çã¿ë µÇ´Â transparency
Ä¡´Â OPAQUE
,BITMASK
, ¶Ç´Â TRANSLUCENT
ÀÔ´Ï´Ù. transferType
´Â Çȼ¿Ä¡¸¦ Ç¥ÇöÇϱâ À§Çؼ »ç¿ëÇÏ´Â ¿ø½ÃÀû ¹è¿ÀÇ ÇüÅÂÀÔ´Ï´Ù.
colorSpace
- ÀÌ Ä®¶ó ¸ðµ¨¿¡ °ü·ÃÇÑ ColorSpace
bits
- ¼ººÐ¸¶´ÙÀÇ À¯È¿ ºñÆ®¼ö. null ÀÇ °æ¿ì, ¸ðµç ¼ººÐ »ùÇÃÀÇ ¸ðµç ºñÆ®°¡ À¯È¿ÇÏ°Ô µÈ´Ù. transferType °¡ DataBuffer.TYPE_SHORT
,DataBuffer.TYPE_FLOAT
, ¶Ç´Â DataBuffer.TYPE_DOUBLE
ÀÇ °æ¿ì´Â ¹«½ÃµÇ¾î ¸ðµç ¼ººÐ »ùÇÃÀÇ ¸ðµç ºñÆ®°¡ À¯È¿ÇÏ°Ô µÇ´ÂhasAlpha
- true ÀÇ °æ¿ì, ÀÌ Ä®¶ó ¸ðµ¨Àº ¾ËÆÄ¸¦ ¼Æ÷Æ®ÇÏ´ÂisAlphaPremultiplied
- true ÀÇ °æ¿ì, ¾ËÆÄ´Â ¹Ì¸® °ö¼ÀµÇ°í ÀÖ´Âtransparency
- ÀÌ Ä®¶ó ¸ðµ¨·Î ³ªÅ¸³¾ ¼ö°¡ ÀÖ´Â ¾ËÆÄÄ¡¸¦ ÁöÁ¤ÇÏ´ÂtransferType
- Çȼ¿Ä¡¸¦ Ç¥ÇöÇϱâ À§Çؼ »ç¿ëµÇ´Â ¿ø½ÃÀû ¹è¿ÀÇ ÇüŸ¦ ÁöÁ¤ÇÑ´Ù
IllegalArgumentException
- bits
¹è¿ Àμö°¡ null °¡ ¾Æ´Ñ °æ¿ì, ±× ±æÀÌ´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐº¸´Ù ÀÛ°í, Àü¼ÛÇüÀº 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
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
ÀÔ´Ï´Ù. »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐ¸¶´ÙÀÇ À¯È¿ ºñÆ®¼ö´Â °¢°¢ 8, 16, 32, 16, 32, 64 ÀÔ´Ï´Ù. »ö¼ººÐ¼ö´Â ColorSpace
¿¡ ÀÖ´Â ¼ººÐ¼ö°¡ µË´Ï´Ù. hasAlpha
°¡ true ÀÇ °æ¿ì, ¾ËÆÄ ¼ººÐÀÌ ÀÖ½À´Ï´Ù. hasAlpha
°¡ true ÀÇ °æ¿ì, boolean ÇüÀÇ isAlphaPremultiplied
´Â Çȼ¿Ä¡¿¡ ÀÖ´Â Ä®¶ó »ùÇà ¹× ¾ËÆÄ »ùÇÃÀ» Æò°¡ÇÏ´Â ¹æ¹ýÀ» ÁöÁ¤ÇÕ´Ï´Ù. boolean °¡ true ÀÇ °æ¿ì´Â Ä®¶ó »ùÇÃÀº ¾ËÆÄ »ùÇðú °ö¼ÀµÇ¾ú´Ù°í º¸¿©Áý´Ï´Ù. transparency
´Â ÀÌ Ä®¶ó ¸ðµ¨·Î Ç¥ÇöÇÒ ¼ö ÀÖ´Â ¾ËÆÄÄ¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çã¿ë µÇ´Â transparency
Ä¡´Â OPAQUE
,BITMASK
, ¶Ç´Â TRANSLUCENT
ÀÔ´Ï´Ù. transferType
´Â Çȼ¿Ä¡ÀÇ Ç¥Çö¿¡ »ç¿ëÇÏ´Â ¿ø½ÃÀû ¹è¿ÀÇ ÇüÅÂÀÔ´Ï´Ù.
colorSpace
- ÀÌ Ä®¶ó ¸ðµ¨¿¡ °ü·ÃÇÑ ColorSpace
hasAlpha
- true ÀÇ °æ¿ì, ÀÌ Ä®¶ó ¸ðµ¨Àº ¾ËÆÄ¸¦ ¼Æ÷Æ®ÇÏ´ÂisAlphaPremultiplied
- true ÀÇ °æ¿ì, ¾ËÆÄ´Â ¹Ì¸® °ö¼ÀµÇ°í ÀÖ´Âtransparency
- ÀÌ Ä®¶ó ¸ðµ¨·Î Ç¥Çö °¡´ÉÇÑ ¾ËÆÄÄ¡¸¦ ÁöÁ¤ÇÏ´ÂtransferType
- Çȼ¿Ä¡ÀÇ Ç¥Çö¿¡ »ç¿ëÇÏ´Â ¿ø½ÃÀû ¹è¿ÀÇ ÇüŸ¦ ÁöÁ¤ÇÑ´Ù
IllegalArgumentException
- transferType °¡,DataBuffer.TYPE_BYTE
,DataBuffer.TYPE_USHORT
,DataBuffer.TYPE_INT
,DataBuffer.TYPE_SHORT
,DataBuffer.TYPE_FLOAT
,DataBuffer.TYPE_DOUBLE
ÀÇ ¾î¶² °Íµµ ¾Æ´Ñ °æ¿ìColorSpace
,
Transparency
¸Þ¼ÒµåÀÇ »ó¼¼ |
public int getRed(int pixel)
ColorModel
³»ÀÇ getRed
pixel
- Àû»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºÎÈ£ ÷ºÎÀÇ °æ¿ìpublic int getGreen(int pixel)
ColorModel
³»ÀÇ getGreen
pixel
- ³ì»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºÎÈ£ ÷ºÎÀÇ °æ¿ìpublic int getBlue(int pixel)
ColorModel
³»ÀÇ getBlue
pixel
- û»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºÎÈ£ ÷ºÎÀÇ °æ¿ìpublic int getAlpha(int pixel)
ColorModel
³»ÀÇ getAlpha
pixel
- ¾ËÆÄ ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºÎÈ£ ÷ºÎÀÇ °æ¿ìpublic int getRGB(int pixel)
ColorModel
³»ÀÇ getRGB
pixel
- »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºÎÈ£ ÷ºÎÀÇ °æ¿ìColorModel.getRGBdefault()
public int getRed(Object inData)
pixel
Ä¡´Â ¿ÀºêÁ§Æ® ÂüÁ¶·Î¼ °Ç³×¹ÞÀº transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò·ÎºÎÅÍ µÇ´Â ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. ¹Ýȯ°ªÀº ¹Ì¸® °ö¼ÀµÇ¾î ÀÖÁö ¾ÊÀº °ªÀÔ´Ï´Ù. ¾ËÆÄ°¡ ¹Ì¸® °ö¼ÀµÇ°í ÀÖ´Â °æ¿ì, ÀÌ ¸Þ¼Òµå´Â °ªÀ» µ¹·ÁÁÖ±â Àü¿¡ ¾ËÆÄ¸¦ Á¦»êÇÕ´Ï´Ù. ¾ËÆÄÄ¡°¡ 0 ÀÇ °æ¿ì, »¡°ÀÇ °ªÀº 0 ÀÌ µË´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º°¡ ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getRed
inData
- Àû»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿. transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤ÇÑ´Ù
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
)ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ìpublic int getGreen(Object inData)
ColorSpace
(sRGB)·Î 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. ÇÊ¿äÇÑ °æ¿ì´Â »öº¯È¯À» ÇÕ´Ï´Ù. pixel
Ä¡´Â ¿ÀºêÁ§Æ® ÂüÁ¶·Î¼ °Ç³×¹ÞÀº transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò·ÎºÎÅÍ µÇ´Â ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. ¹Ýȯ°ªÀº ¹Ì¸® °ö¼ÀµÇ¾î ÀÖÁö ¾ÊÀº °ªÀÔ´Ï´Ù. ¾ËÆÄ°¡ ¹Ì¸® °ö¼ÀµÇ°í ÀÖ´Â °æ¿ì, ÀÌ ¸Þ¼Òµå´Â °ªÀ» µ¹·ÁÁÖ±â Àü¿¡ ¾ËÆÄ¸¦ Á¦»êÇÕ´Ï´Ù. ¾ËÆÄÄ¡°¡ 0 ÀÇ °æ¿ì, ÃÊ·ÏÀÇ °ªÀº 0 ÀÌ µË´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getGreen
inData
- ³ì»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿. transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤ÇÑ´Ù
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
)ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ìpublic int getBlue(Object inData)
ColorSpace
(sRGB)·Î 0 ~ 255 ÀÇ ¹üÀ§¿¡¼ ½½Ä¶¸µ ÇØ µ¹·ÁÁÝ´Ï´Ù. ÇÊ¿äÇÑ °æ¿ì´Â »öº¯È¯À» ÇÕ´Ï´Ù. pixel
Ä¡´Â ¿ÀºêÁ§Æ® ÂüÁ¶·Î¼ °Ç³×¹ÞÀº transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò·ÎºÎÅÍ µÇ´Â ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. ¹Ýȯ°ªÀº ¹Ì¸® °ö¼ÀµÇ¾î ÀÖÁö ¾ÊÀº °ªÀÔ´Ï´Ù. ¾ËÆÄ°¡ ¹Ì¸® °ö¼ÀµÇ°í ÀÖ´Â °æ¿ì, ÀÌ ¸Þ¼Òµå´Â °ªÀ» µ¹·ÁÁÖ±â Àü¿¡ ¾ËÆÄ¸¦ Á¦»êÇÕ´Ï´Ù. ¾ËÆÄÄ¡°¡ 0 ÀÇ °æ¿ì, ÆÄ¶ûÀÇ °ªÀº 0 ÀÌ µË´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getBlue
inData
- û»ö ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿. transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤ÇÑ´Ù
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
)ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ìpublic int getAlpha(Object inData)
transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò·ÎºÎÅÍ µÇ´Â ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getAlpha
inData
- ¾ËÆÄ ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿. transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤ÇÑ´Ù
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
)ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ìpublic int getRGB(Object inData)
transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò·ÎºÎÅÍ µÇ´Â ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. ¹Ýȯ°ªÀº ¹Ì¸® °ö¼ÀµÇ¾î ÀÖÁö ¾ÊÀº °ªÀÔ´Ï´Ù. ¾ËÆÄ°¡ ¹Ì¸® °ö¼ÀµÇ°í ÀÖ¾úÀ» °æ¿ì, ÀÌ ¸Þ¼Òµå´Â »ö¼ººÐÀ¸·Î ¾ËÆÄ¸¦ Á¦»êÇÕ´Ï´Ù. ¾ËÆÄÄ¡°¡ 0 ÀÇ °æ¿ì, Ä®¶óÄ¡´Â 0 ÀÌ µË´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getRGB
inData
- »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» ÃëµæÇÏ´Â Çȼ¿. transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤ÇÑ´Ù
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()
public Object getDataElements(int rgb, Object pixel)
ColorModel
ÀÇ Çȼ¿ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» µ¹·ÁÁÝ´Ï´Ù. ±× ÈÄ ÀÌ ¹è¿Àº WritableRaster
¿ÀºêÁ§Æ®ÀÇ setDataElements
¸Þ¼Òµå¿¡ °Ç³×ÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù. pixel
ÆÄ¶ó¹ÌÅͰ¡ null ÀÎ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº 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)
public int[] getComponents(int pixel, int[] components, int offset)
ColorModel ÀÇ Çȼ¿À» ÁöÁ¤ÇØ, Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ColorModel ÀÇ ¼ººÐÄ¡°¡ ºñÇ¥ÁØÈ Çü½Ä¿¡¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì´Â IllegalArgumentException °¡ ½½·Î¿ì µË´Ï´Ù. »ö¼ººÐÀ̳ª ¾ËÆÄ ¼ººÐÀº components
¹è¿ÀÇ offset
À§Ä¡·ÎºÎÅÍ ÀúÀåµË´Ï´Ù. À̰ÍÀº ¹è¿ÀÌ ÀÌ ¸Þ¼Òµå·Î ÇÒ´çÇÒ ¼ö ÀÖ°í ÀÖ´Â °æ¿ìµµ °°½À´Ï´Ù.
- ¿À¹ö¶óÀ̵å(override):
- Ŭ·¡½º
ColorModel
³»ÀÇ getComponents
- ÆÄ¶ó¹ÌÅÍ:
pixel
- Á¤¼ö·Î ÁöÁ¤µÇ´Â Çȼ¿Ä¡components
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇÏ´Â Á¤¼öÇüÀÇ ¹è¿. components
¹è¿ÀÌ null ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ´Âoffset
- components
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)
- ¹Ýȯ°ª:
- components ¹è¿
- ¿¹¿Ü:
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ì
ArrayIndexOutOfBoundsException
- components
¹è¿ÀÌ null °¡ ¾Æ´Ñ °æ¿ì¿¡, offset ·ÎºÎÅÍÀÇ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ò ¶§
public int[] getComponents(Object pixel, int[] components, int offset)
ColorModel ÀÇ Çȼ¿À» ÁöÁ¤ÇØ, Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. Çȼ¿ÀÇ °ªÀº ¿ÀºêÁ§Æ® ÂüÁ¶·Î¼ °Ç³×¹ÞÀº transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼Ò¿¡ ÀÇÇÑ ¹è¿·Î ÁöÁ¤µË´Ï´Ù. ÀÌ ColorModel
ÀÇ ¼ººÐÄ¡°¡ ºñÇ¥ÁØÈ Çü½Ä¿¡¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì´Â IllegalArgumentException °¡ ½½·Î¿ì µË´Ï´Ù. »ö¼ººÐÀ̳ª ¾ËÆÄ ¼ººÐÀº components
¹è¿ÀÇ offset
ÀÇ À§Ä¡·ÎºÎÅÍ ÀúÀåµË´Ï´Ù. À̰ÍÀº ¹è¿ÀÌ ÀÌ ¸Þ¼Òµå·Î ÇÒ´çÇÒ ¼ö ÀÖ°í ÀÖ´Â °æ¿ìµµ °°½À´Ï´Ù.
ComponentColorModel ´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ÀÌ ¸Þ¼Òµå´Â ¿¹¿Ü¸¦ ½½·Î¿ì ÇÏ´Â ÀÏÀÌ ÀÖ½À´Ï´Ù.
- ¿À¹ö¶óÀ̵å(override):
- Ŭ·¡½º
ColorModel
³»ÀÇ getComponents
- ÆÄ¶ó¹ÌÅÍ:
pixel
- transferType
ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿·Î ÁöÁ¤µÇ´Â Çȼ¿Ä¡components
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇÏ´Â Á¤¼öÇüÀÇ ¹è¿. components
¹è¿ÀÌ null ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ´Âoffset
- components
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)
- ¹Ýȯ°ª:
components
¹è¿
- ¿¹¿Ü:
IllegalArgumentException
- ÀÌ ComponentColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ì
UnsupportedOperationException
- ÀÌ ComponentColorModel
ÀÇ Àü¼ÛÇüÀÌ,DataBuffer.TYPE_BYTE
,DataBuffer.TYPE_USHORT
,DataBuffer.TYPE_INT
ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ì
ClassCastException
- pixel
°¡ transferType
ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ñ °æ¿ì
IllegalArgumentException
- components
¹è¿ÀÌ null °¡ ¾Æ´Ñ °æ¿ì¿¡, offset ·ÎºÎÅÍÀÇ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ò ¶§. ȤÀº pixel
°¡ ÀÌ ColorModel ÀÇ Çȼ¿Ä¡¸¦ º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì
public int[] getUnnormalizedComponents(float[] normComponents, int normOffset, int[] components, int offset)
ColorModel
ÀÇ ColorSpace
¿¡ ÀÇÇØ ÁöÁ¤µÈ 1 ¼ººÐ ±ÙóÀÇ ÃÖ¼Ò¿Í ÃÖ´ëÀÇ »çÀÌÀÇ float Ä¡ÀÔ´Ï´Ù. ÀÌ ColorModel
ÀÇ »ö¼ººÐÄ¡°¡ ºñÇ¥ÁØÈ Çü½Ä¿¡¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì´Â IllegalArgumentException
°¡ ½½·Î¿ì µË´Ï´Ù. components ¹è¿ÀÌ null
ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. components
¹è¿ÀÌ µ¹·ÁÁÖ¾îÁý´Ï´Ù. »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀº offset
¸¦ ±âÁ¡À¸·Î components
¹è¿¿¡ ÀúÀåµË´Ï´Ù. ¹è¿ÀÌ ÀÌ ¸Þ¼Òµå·Î ÇÒ´çÇÒ ¼ö ÀÖ°í ÀÖ´Â °æ¿ìµµ °°½À´Ï´Ù. components
¹è¿ÀÌ null
°¡ ¾Æ´Ñ °æ¿ì¿¡, (offset
¸¦ ±âÁ¡À¸·Î) ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ò ¶§´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù. normComponents
¹è¿ÀÌ normOffset
¸¦ ±âÁ¡À¸·Î ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â IllegalArgumentException
°¡ ½½·Î¿ì µË´Ï´Ù.
- ¿À¹ö¶óÀ̵å(override):
- Ŭ·¡½º
ColorModel
³»ÀÇ getUnnormalizedComponents
- ÆÄ¶ó¹ÌÅÍ:
normComponents
- Ç¥ÁØÈ ¼ººÐÀ» ÀúÀåÇϰí ÀÖ´Â ¹è¿normOffset
- Ç¥ÁØÈ ¼ººÐÀÇ ÃëµæÀ» °³½ÃÇÏ´Â normComponents
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)components
- normComponents
·ÎºÎÅÍ ¼ººÐÀ» ¹Þ´Â ¹è¿offset
- normComponents
·ÎºÎÅÍ Ç¥ÁØÈ ¼ººÐÀÇ ÀúÀåÀ» °³½ÃÇÏ´Â components
³»ÀÇ À妽º
- ¹Ýȯ°ª:
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÌ ÀúÀåµÇ°í ÀÖ´Â ¹è¿
- ¿¹¿Ü:
IllegalArgumentException
- ÀÌ ComponentColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ì
IllegalArgumentException
- normComponents
·ÎºÎÅÍ normOffset
À» »« ±æÀ̰¡ numComponents
º¸´Ù ÀÛÀº °æ¿ì
public float[] getNormalizedComponents(int[] components, int offset, float[] normComponents, int normOffset)
ColorModel
ÀÇ ColorSpace
¿¡ ÀÇÇØ ÁöÁ¤µÈ 1 ¼ººÐ ±ÙóÀÇ ÃÖ¼Ò¿Í ÃÖ´ëÀÇ »çÀÌÀÇ float Ä¡ÀÔ´Ï´Ù. ÀÌ ColorModel
ÀÇ »ö¼ººÐÄ¡°¡ ºñÇ¥ÁØÈ Çü½Ä¿¡¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì´Â IllegalArgumentException
°¡ ½½·Î¿ì µË´Ï´Ù. components ¹è¿ÀÌ null
ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. components
¹è¿ÀÌ µ¹·ÁÁÖ¾îÁý´Ï´Ù. »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀº offset
¸¦ ±âÁ¡À¸·Î components
¹è¿¿¡ ÀúÀåµË´Ï´Ù. ¹è¿ÀÌ ÀÌ ¸Þ¼Òµå·Î ÇÒ´çÇÒ ¼ö ÀÖ°í ÀÖ´Â °æ¿ìµµ °°½À´Ï´Ù. components
¹è¿ÀÌ null
°¡ ¾Æ´Ñ °æ¿ì¿¡, (offset
¸¦ ±âÁ¡À¸·Î) ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ò ¶§´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù. normComponents
¹è¿ÀÌ normOffset
¸¦ ±âÁ¡À¸·Î ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â IllegalArgumentException
°¡ ½½·Î¿ì µË´Ï´Ù.
- ¿À¹ö¶óÀ̵å(override):
- Ŭ·¡½º
ColorModel
³»ÀÇ getNormalizedComponents
- ÆÄ¶ó¹ÌÅÍ:
components
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº ¼ººÐÀ» ÀúÀåÇϰí ÀÖ´Â ¹è¿offset
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº ¼ººÐÀÇ ÃëµæÀ» °³½ÃÇÏ´Â components
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)normComponents
- Ç¥ÁØÈ ¼ººÐÀ» ¹Þ´Â ¹è¿normOffset
- Ç¥ÁØÈ ¼ººÐÀÇ ÀúÀåÀ» °³½ÃÇÏ´Â normComponents
³»ÀÇ À妽º
- ¹Ýȯ°ª:
- Ç¥ÁØÈ µÇ°í ÀÖ´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÌ ÀúÀåµÇ°í ÀÖ´Â ¹è¿
- ¿¹¿Ü:
IllegalArgumentException
- ÀÌ ComponentColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ì
public int getDataElement(int[] components, int offset)
ColorModel
ÀÇ int ·Î¼ Ç¥ÇöµÇ´Â Çȼ¿Ä¡¸¦ µ¹·ÁÁÝ´Ï´Ù.
ColorModel
³»ÀÇ getDataElement
components
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀÇ ¹è¿offset
- components
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)
IllegalArgumentException
- ÀÌ ColorModel
¿¡ 2 °³ ÀÌ»óÀÇ ¼ººÐÀÌ ÀÖ´Â °æ¿ì
IllegalArgumentException
- ÀÌ ComponentColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ìpublic Object getDataElements(int[] components, int offset, Object obj)
ColorModel
ÀÇ Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¹è¿Àº WritableRaster
¿ÀºêÁ§Æ®ÀÇ setDataElements
¸Þ¼Òµå¿¡ °Ç³×ÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù.
ColorModel
³»ÀÇ getDataElements
components
- Ç¥ÁØÈµÇ¾î ÀÖÁö ¾ÊÀº »ö¼ººÐ ¶Ç´Â ¾ËÆÄ ¼ººÐÀÇ ¹è¿offset
- components
¹è¿³»ÀÇ int ¿ÀÇÁ¼Â(offset)obj
- Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» ÀúÀåÇÏ´Â ¿ÀºêÁ§Æ®. obj
º¯¼ö°¡ null ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ´Ù. obj
°¡ null °¡ ¾Æ´Ñ °æ¿ì´Â transferType
ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ï¸é ¾ÈµÈ´Ù. obj
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µÈ´Ù. ComponentColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÏÁö¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µÈ´Ù
ColorModel
ÀÇ Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥Çö
IllegalArgumentException
- components ¹è¿ÀÌ, offset ·ÎºÎÅÍÀÇ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì
ClassCastException
- obj
°¡ null °¡ ¾Æ´Ï°í,transferType
ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ñ °æ¿ì
ArrayIndexOutOfBoundsException
- obj
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì
IllegalArgumentException
- ÀÌ ComponentColorModel
°¡ ºñÇ¥ÁØÈ Çü½ÄÀ» ¼Æ÷Æ®ÇÏÁö ¾Ê´Â °æ¿ì
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)
public int getDataElement(float[] normComponents, int normOffset)
ColorModel
¿¡ int
·Î¼ ³ªÅ¸³»Áö´Â Çȼ¿Ä¡¸¦ µ¹·ÁÁÝ´Ï´Ù. ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡°¡ ´ÜÀÏÀÇ int
·Î¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì, ÀÌ ¸Þ¼Òµå´Â IllegalArgumentException
¸¦ ½½·Î¿ì ÇÕ´Ï´Ù. normComponents
¹è¿ÀÌ (normOffset
¸¦ ±âÁ¡À¸·Î) ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getDataElement
normComponents
- Ç¥ÁØÈ µÇ°í ÀÖ´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿normOffset
- »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ÃëµæÀ» °³½ÃÇÏ´Â normComponents
³»ÀÇ À妽º
ColorModel
³»ÀÇ int
Çȼ¿Ä¡
IllegalArgumentException
- ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡°¡ ´ÜÀÏÀÇ int
·Î¼ Ç¥ÇöÇÒ ¼ö ¾ø´Â °æ¿ì
ArrayIndexOutOfBoundsException
- normComponents
¹è¿ÀÇ Å©±â°¡ normOffset
¸¦ ±âÁ¡À¸·Î ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÏÁö ¾ÊÀº °æ¿ìpublic Object getDataElements(float[] normComponents, int normOffset, Object obj)
ColorModel
ÀÇ Çȼ¿ÀÇ µ¥ÀÌÅÍ ¿ä¼Ò ¹è¿ Ç¥ÇöÀ» µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¹è¿Àº WritableRaster
¿ÀºêÁ§Æ®ÀÇ setDataElements
¸Þ¼Òµå¿¡ °Ç³×ÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù. normComponents
¹è¿ÀÌ (normOffset
¸¦ ±âÁ¡À¸·Î) ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù. obj
º¯¼ö°¡ null
ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. obj
°¡ null
°¡ ¾Æ´Ñ °æ¿ì´Â transferType ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â ClassCastException
°¡ ½½·Î¿ì µË´Ï´Ù. obj
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ ÀúÀåÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ getDataElements
normComponents
- Ç¥ÁØÈ µÇ°í ÀÖ´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ¹è¿normOffset
- »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÇ ÃëµæÀ» °³½ÃÇÏ´Â normComponents
³»ÀÇ À妽ºobj
- µ¹·ÁÁÖ¾îÁø Çȼ¿À» º¸°ü À¯ÁöÇÏ´Â ¿ø½ÃÀû µ¥ÀÌÅÍ ¹è¿
Object
ClassCastException
- obj
°¡ transferType
ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ñ °æ¿ì
ArrayIndexOutOfBoundsException
- obj
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì, ȤÀº normOffset
¸¦ ±âÁ¡À¸·Î ÇÑ normComponents
¹è¿ÀÌ ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ìWritableRaster.setDataElements(int, int, java.lang.Object)
,
SampleModel.setDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)
public float[] getNormalizedComponents(Object pixel, float[] normComponents, int normOffset)
ÀÇ ÁöÁ¤µÈ Çȼ¿¿¡ ´ëÇØ, Ç¥ÁØÈ Çü½Ä¿¡¼ »ö¼ººÐ°ú ¾ËÆÄ ¼ººÐÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. Çȼ¿Ä¡´Â ¿ÀºêÁ§Æ® ÂüÁ¶·Î¼ °Ç³×¹Þ´Â transferType ÇüÀÇ µ¥ÀÌÅÍ ¿ä¼ÒÀÇ ¹è¿¿¡ ÀÇÇØ ÁöÁ¤µË´Ï´Ù. pixel °¡ transferType ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ñ °æ¿ì´Â ClassCastException
°¡ ½½·Î¿ì µË´Ï´Ù. pixel
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ ÀúÀåÇÒ ¼ö ÀÖÀ» ¸¸Å Å©Áö ¾ÊÀº °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù. Ç¥ÁØÈ ¼ººÐÀº ÀÌ
ColorModel ÀÇ ColorSpace
¿ÀºêÁ§Æ®¿¡ ÀÇÇØ ÁöÁ¤µÈ ¼ººÐ¸¶´ÙÀÇ ÃÖ¼Ò¿Í ÃÖ´ëÀÇ »çÀÌÀÇ float Ä¡ÀÔ´Ï´Ù. normComponents
¹è¿ÀÌ null
ÀÇ °æ¿ì´Â »õ·Î¿î ¹è¿À» ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. ±× normComponents
¹è¿ÀÌ µ¹·ÁÁÖ¾îÁý´Ï´Ù. »ö¼ººÐ°ú ¾ËÆÄ ¼ººÐÀº normOffset
·ÎºÎÅÍ ½ÃÀ۵Ǵ normComponents
¹è¿¿¡ ÀúÀåµË´Ï´Ù. À̰ÍÀº ¹è¿ÀÌ ÀÌ ¸Þ¼Òµå·Î ÇÒ´çÇÒ ¼ö ÀÖ°í ÀÖ´Â °æ¿ìµµ °°½À´Ï´Ù. normComponents
¹è¿ÀÌ null
°¡ ¾Æ´Ï°í, »ö¼ººÐ°ú ¾ËÆÄ ¼ººÐ (normOffset
·ÎºÎÅÍ ½ÃÀ۵ȴÙ)ÀÇ ¸ðµç °ÍÀ» ÀúÀåÇÒ ¼ö ÀÖÀ» ¸¸Å Å©Áö ¾ÊÀº °æ¿ì´Â ArrayIndexOutOfBoundsException
°¡ ½½·Î¿ì µË´Ï´Ù.
¼ºê Ŭ·¡½º°¡ µðÆúÆ®¿Í´Â ´Ù¸¥ ¹æ¹ýÀ¸·Î Çȼ¿ »ùÇÃÄ¡¸¦ »ö¼ººÐÄ¡¿¡ º¯È¯Çϵµ·Ï(µíÀÌ) ¼³°èµÇ°í ÀÖ´Â °æ¿ì´Â ÀÌ ¸Þ¼Òµå¸¦ ¼ºê Ŭ·¡½º¿¡¼ ¿À¹ö¶óÀ̵å(override) ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ Å¬·¡½º¿¡ ÀÇÇØ ±¸ÇöµÇ´Â µðÆúÆ®ÀÇ º¯È¯Àº Ŭ·¡½ºÀÇ ÄÚ¸àÆ®¿¡ ±â¼úµÇ°í ÀÖ½À´Ï´Ù. µðÆúÆ®°¡ ¾Æ´Ñ º¯È¯À» ±¸ÇöÇÏ´Â ¼ºê Ŭ·¡½º´Â ÀÌ ÄÚ¸àÆ®¿¡ Á¤ÀÇµÈ Çã¿ë º¯È¯ÀÇ Á¦¾à¿¡ µû¸¦ Çʿ䰡 ÀÖ½À´Ï´Ù.
- ¿À¹ö¶óÀ̵å(override):
- Ŭ·¡½º
ColorModel
³»ÀÇ getNormalizedComponents
- ÆÄ¶ó¹ÌÅÍ:
pixel
- ÁöÁ¤µÈ Çȼ¿normComponents
- Ç¥ÁØÈ ¼ººÐÀ» ¹Þ´Â ¹è¿normOffset
- Ç¥ÁØÈ ¼ººÐÀÇ ÀúÀåÀ» °³½ÃÇÏ´Â normComponents
¹è¿³»ÀÇ ¿ÀÇÁ¼Â(offset)
- ¹Ýȯ°ª:
- Ç¥ÁØÈ µÇ°í ÀÖ´Â »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀÌ ÀúÀåµÇ°í ÀÖ´Â ¹è¿
- ¿¹¿Ü:
ClassCastException
- pixel
°¡ transferType ÇüÀÇ ¿ø½ÃÀû ¹è¿ÀÌ ¾Æ´Ñ °æ¿ì
ArrayIndexOutOfBoundsException
- normComponents
ÀÇ Å©±â°¡ normOffset
¸¦ ±âÁ¡À¸·Î ¸ðµç »ö¼ººÐ ¹× ¾ËÆÄ ¼ººÐÀ» º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÏÁö ¾ÊÀº °æ¿ì
ArrayIndexOutOfBoundsException
- pixel
°¡ ÀÌ ColorModel
ÀÇ Çȼ¿Ä¡¸¦ º¸°ü À¯ÁöÇϴµ¥ ÃæºÐÇÑ Å©±â°¡ ¾Æ´Ñ °æ¿ì- µµÀÔµÈ ¹öÁ¯:
- 1.4
public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied)
isAlphaPremultiplied
º¯¼ö·Î ÁöÁ¤µÈ »óÅÂ¿Í ÀÏÄ¡Çϵµ·Ï(µíÀÌ) ÇÕ´Ï´Ù. ÀÌ ¶§, µ¥ÀÌÅÍ´Â ÀÌ ColorModel
¿¡ ÀÇÇØ ÇöÀç ¿Ã¹Ù¸£°Ô ±â¼úµÇ°í ÀÖ´Ù°í º¸¿©Áý´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â Ä®¶ó ¶ó½ºÅÍ µ¥ÀÌÅ͸¦ ¾ËÆÄ¿¡¼ °ö¼À ¶Ç´Â Á¦»êÇÕ´Ï´Ù. µ¥ÀÌÅͰ¡ ¿Ã¹Ù¸¥ »óÅ¿¡ ÀÖ´Â °æ¿ì¿¡´Â 󸮴 ½Ç½ÃÇÏÁö ¾Ê½À´Ï´Ù. µ¥ÀÌÅͰ¡ °Á¦ÀûÀ¸·Î ÇüÅ º¯È¯µÉ Çʿ䰡 ÀÖ´Â °æ¿ì, ÀÌ ¸Þ¼Òµå´Â isAlphaPremultiplied
Ç÷¡±×¸¦ ¿Ã¹Ù¸£°Ô ¼³Á¤ÇÑ, ÀÌ ColorModel
ÀÇ ÀνºÅϽºµµ µ¹·ÁÁÝ´Ï´Ù. ColorModel
´Â ¼ºê Ŭ·¡½ºÈÇÒ ¼ö ÀÖ±â (À§ÇØ)¶§¹®¿¡, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼ÒµåÀÇ ±¸ÇöÀ» °è½ÂÇÕ´Ï´Ù¸¸, ¼ºê Ŭ·¡½º°¡ ±× ±¸ÇöÀ» ¿À¹ö¶óÀ̵å(override) ÇÏÁö ¾Ê°í °Ô´Ù°¡ ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº transferType
¸¦ »ç¿ëÇßÀ» °æ¿ì, ¿¹¿Ü°¡ ½½·Î¿ì µË´Ï´Ù.
ColorModel
³»ÀÇ coerceData
raster
- WritableRaster
µ¥ÀÌÅÍisAlphaPremultiplied
- ¾ËÆÄ°¡ ¹Ì¸® °ö¼ÀµÇ´Â °æ¿ì´Â 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
)ÀÇ ¸ÓÁö¾Ê¾Æµµ ¾Æ´Ñ °æ¿ìpublic boolean isCompatibleRaster(Raster raster)
raster
°¡ ÀÌ ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÖ¾î, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false ¸¦ µ¹·ÁÁÝ´Ï´Ù.
ColorModel
³»ÀÇ isCompatibleRaster
raster
- ȣȯ¼ºÀ» ÆÇÁ¤ÇÏ´Â Raster
¿ÀºêÁ§Æ®
raster
°¡ ÀÌ ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â °æ¿ì´Â true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
public WritableRaster createCompatibleWritableRaster(int w, int h)
ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â µ¥ÀÌÅÍ ·¹À̾ƿô (SampleModel
)À» °¡Áö´Â WritableRaster
¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
ColorModel
³»ÀÇ createCompatibleWritableRaster
w
- »ý¼ºÇÏ´Â WritableRaster
ÀÇ Æøh
- »ý¼ºÇÏ´Â WritableRaster
ÀÇ ³ôÀÌ
ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â WritableRaster
WritableRaster
,
SampleModel
public SampleModel createCompatibleSampleModel(int w, int h)
ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â µ¥ÀÌÅÍ ·¹À̾ƿôÀ» °¡Áö´Â SampleModel
¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
ColorModel
³»ÀÇ createCompatibleSampleModel
w
- »ý¼ºÇÏ´Â SampleModel
ÀÇ Æøh
- »ý¼ºÇÏ´Â SampleModel
ÀÇ ³ôÀÌ
ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â SampleModel
SampleModel
public boolean isCompatibleSampleModel(SampleModel sm)
SampleModel
°¡ ÀÌ ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
ColorModel
³»ÀÇ isCompatibleSampleModel
sm
- ȣȯ¼ºÀ» ÆÇÁ¤ÇÏ´Â SampleModel
SampleModel
°¡ ÀÌ ColorModel
¿Í ȣȯ¼ºÀÌ ÀÖ´Â °æ¿ì´Â true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
SampleModel
public WritableRaster getAlphaRaster(WritableRaster raster)
Raster
¸¦, ÀÔ·ÂµÈ Raster
·ÎºÎÅÍ ÃßÃâÇØ µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â ÀÌ ColorModel
¿¡ °ü·ÃÇÑ Raster
¿ÀºêÁ§Æ®¿¡ ¾ËÆÄ ¹êµå°¡ ÀÖÀ¸¸é, ±× ¾ËÆÄ ¹êµå¸¦ À̹ÌÁö µ¥ÀÌÅÍÀÇ ÃÖÁ¾ ¹êµå·Î¼ ÀúÀåÇϰí ÀÖ´Ù°í º¾´Ï´Ù. ÀÌ ColorModel
¿¡ °ü·ÃÇÑ °ø°£ ¾ËÆÄ ä³ÎÀÌ ±× ¹Û¿¡ ¾ø´Â °æ¿ì´Â null ¸¦ µ¹·ÁÁÝ´Ï´Ù. ÀÌ ¸Þ¼Òµå´Â »õ·Î¿î Raster
¸¦ ÀÛ¼ºÇÕ´Ï´Ù¸¸, µ¥ÀÌÅÍ ¹è¿Àº °øÀ¯ÇÏ°Ô µË´Ï´Ù.
ColorModel
³»ÀÇ getAlphaRaster
raster
- ¾ËÆÄ ä³ÎÀ» ÃßÃâÇÏ´Â WritableRaster
WritableRaster
public boolean equals(Object obj)
ColorModel
³»ÀÇ equals
obj
- ÀÌ Ä®¶ó ¸ðµ¨°ú ºñ±³ÇÏ´Â ¿ÀºêÁ§Æ®
true
, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ ÀÖ¾î¼ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.