JavaTM 2
Platform
Std.  Ed.  v1. 4.0

java.awt.image
ÀÎÅÍÆäÀ̽º ImageConsumer

±âÁ¸ÀÇ ±¸Çö Ŭ·¡½ºÀÇ À϶÷:
ImageFilter , PixelGrabber

public interface ImageConsumer

ImageProducer ÀÎÅÍÆäÀ̽º °æÀ¯·Î À̹ÌÁö µ¥ÀÌÅ͸¦ Ç¥½ÃÇÏ´Â ¿ÀºêÁ§Æ®¸¦ À§ÇÑ ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. ÄÁ½´¸Ó(consumer)°¡ À̸ÞÀÌÁöÇÁ·Îµà»ç¿¡ Ãß°¡µÇ¸é(ÀÚ), ÇÁ·Îµà»ç´Â ÀÌ ÀÎÅÍÆäÀ̽º·Î Á¤ÀÇµÈ ¸Þ¼Òµå¸¦ È£ÃâÇÏ´Â °Í¿¡ ÀÇÇØ À̹ÌÁö µ¥ÀÌÅ͸¦ Àü¼Û ÇÕ´Ï´Ù.

°ü·Ã Ç׸ñ:
ImageProducer

ÇʵåÀÇ °³¿ä
static int COMPLETESCANLINES
          Çȼ¿Àº 1 ¹ø¿¡ (º¹¼öÀÇ) ¿ÏÀüÇÑ Áֻ缱 ´ÜÀ§·Î Àü¼Û µË´Ï´Ù.
static int IMAGEABORTED
          À̹ÌÁö »ý¼ºÀÌ °íÀÇ·Î ÁߴܵǾú½À´Ï´Ù.
static int IMAGEERROR
          À̹ÌÁöÀÇ »ý¼ºÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇß½À´Ï´Ù.
static int RANDOMPIXELORDER
          Çȼ¿ÀÇ Àü¼Û ¼ø¼­´Â ·£´ýÀÔ´Ï´Ù.
static int SINGLEFRAME
          À̹ÌÁö µ¥ÀÌÅÍ´Â 1 ¸ÅÀÇ Á¤ÁöÈ­¸é»óÀ» Æ÷ÇÔÇϰí ÀÖ½À´Ï´Ù.
static int SINGLEFRAMEDONE
          À̹ÌÁöÀÇ 1 ÇÁ·¹ÀÓÀÇ Àü¼ÛÀÌ ¿Ï·áÇß½À´Ï´Ù¸¸, ¾ÆÁ÷ Àü¼Û ´ë»óÀÇ ÇÁ·¹ÀÓÀÌ ÀÖ½À´Ï´Ù.
static int SINGLEPASS
          Çȼ¿Àº 1 »ìÀÇ ÆÐ½º·Î Àü¼Û µË´Ï´Ù.
static int STATICIMAGEDONE
          À̹ÌÁöÀÇ Àü¼ÛÀÌ ¿Ï·áÇØ, Àü¼Û ´ë»óÀÇ Çȼ¿µµ ÇÁ·¹ÀÓµµ ³²¾Æ ÀÖÁö ¾Ê½À´Ï´Ù.
static int TOPDOWNLEFTRIGHT
          Çȼ¿Àº À§¿¡¼­ ¾Æ·¡, ¿ÞÂÊ¿¡¼­ ¿À¸¥ÂÊÀÇ ¼ø¼­·Î Àü¼Û µË´Ï´Ù.
 
¸Þ¼ÒµåÀÇ °³¿ä
 void imageComplete (int status)
          imageComplete ¸Þ¼Òµå´Â ImageProducer °¡ ¼Ò½º À̹ÌÁöÀÇ ¸ðµç Çȼ¿À» Àü¼Û ³¡¸¶ÃÆÀ» ¶§, ¸ÖƼ ÇÁ·¹ÀÓ ¾Ö´Ï¸ÞÀ̼ÇÀÇ 1 ÇÁ·¹ÀÓÀ» Àü¼Û ³¡¸¶ÃÆÀ» ¶§, ¶Ç´Â À̹ÌÁöÀÇ »ý¼ºÁß ¹× ·ÎµùÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» ¶§¿¡ ºÒ·Á °©´Ï´Ù.
 void setColorModel (ColorModel  model)
          setPixels ¸Þ¼Òµå¸¦ »ç¿ëÇØ º¸°íµÇ´Â Çȼ¿ÀÇ ´ëºÎºÐ¿¡ ´ëÇØ¼­ »ç¿ëµÇ´Â ColorModel ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setDimensions (int width, int height)
          setDimensions ¸Þ¼Òµå È£ÃâÀ» »ç¿ëÇØ, ¼Ò½º À̹ÌÁöÀÇ Å©±â¸¦ º¸°íÇÕ´Ï´Ù.
 void setHints (int hintflags)
          ImageConsumer °¡ ImageProducer ·ÎºÎÅÍ Àü¼Û µÇ´Â Çȼ¿À» ó¸®Çϱâ À§Çؼ­ »ç¿ëµÇ´Â ÈùÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 void setPixels (int x, int y, int w, int h, ColorModel  model, byte[] pixels, int off, int scansize)
          À̹ÌÁöÀÇ Çȼ¿À» 1 ȸ ÀÌ»óÀÇ setPixels ¸Þ¼Òµå È£Ãâ¿¡ ÀÇÇØ Àü¼Û ÇÕ´Ï´Ù.
 void setPixels (int x, int y, int w, int h, ColorModel  model, int[] pixels, int off, int scansize)
          À̹ÌÁöÀÇ Çȼ¿Àº 1 ȸ ÀÌ»óÀÇ setPixels ¸Þ¼ÒµåÀÇ È£Ãâ¿¡ ÀÇÇØ Àü¼Û µË´Ï´Ù.
 void setProperties (Hashtable  props)
          ÀÌ À̹ÌÁö¿¡ °üÇØ¼­, È®Àå °¡´ÉÇÑ ÇÁ·ÎÆÛƼÀÇ ¸®½ºÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 

ÇʵåÀÇ »ó¼¼

RANDOMPIXELORDER

public static final int RANDOMPIXELORDER
Çȼ¿ÀÇ Àü¼Û ¼ø¼­´Â ·£´ýÀÔ´Ï´Ù. Áï, ImageConsumer ¿¡¼­´Â Çȼ¿ÀÇ Àü¼Û ¼ø¼­ÀÇ ÃÖÀûÈ­¸¦ ½Ç½ÃÇÏÁö ¾Ê½À´Ï´Ù. setHints ¸Þ¼Òµå°¡ ºÒ·Á °¡Áö ¾ÊÀ» ¶§´Â ÀÌ ·£´ý Àü¼ÛÀÌ µðÆúÆ®°¡ µË´Ï´Ù.

°ü·Ã Ç׸ñ:
setHints(int) , Á¤¼ö ÇʵåÄ¡

TOPDOWNLEFTRIGHT

public static final int TOPDOWNLEFTRIGHT
Çȼ¿Àº À§¿¡¼­ ¾Æ·¡, ¿ÞÂÊ¿¡¼­ ¿À¸¥ÂÊÀÇ ¼ø¼­·Î Àü¼Û µË´Ï´Ù.

°ü·Ã Ç׸ñ:
setHints(int) , Á¤¼ö ÇʵåÄ¡

COMPLETESCANLINES

public static final int COMPLETESCANLINES
Çȼ¿Àº 1 ¹ø¿¡ (º¹¼öÀÇ) ¿ÏÀüÇÑ Áֻ缱 ´ÜÀ§·Î Àü¼Û µË´Ï´Ù.

°ü·Ã Ç׸ñ:
setHints(int) , Á¤¼ö ÇʵåÄ¡

SINGLEPASS

public static final int SINGLEPASS
Çȼ¿Àº 1 »ìÀÇ ÆÐ½º·Î Àü¼Û µË´Ï´Ù. °¢ Çȼ¿Àº setPixels ¸Þ¼ÒµåÀÇ È£Ãâ·Î 1 ¹ø¸¸ Àü¼Û µË´Ï´Ù. ÀÌ ±âÁذú ´Ù¸¥ À̹ÌÁö Çü½ÄÀÇ ¿¹·Î¼­ ÇÁ·Î±×·¡½Ãºê JPEG À̹ÌÁö°¡ ÀÖ½À´Ï´Ù. ÀÌ Çü½ÄÀº º¹¼öÀÇ ÆÐ½º·Î Çȼ¿À» Á¤ÀÇÇØ, º¸´Ù ¼¼·ÃµÈ À̹ÌÁö¸¦ ±¸¼ºÇÕ´Ï´Ù.

°ü·Ã Ç׸ñ:
setHints(int) , Á¤¼ö ÇʵåÄ¡

SINGLEFRAME

public static final int SINGLEFRAME
À̹ÌÁö µ¥ÀÌÅÍ´Â 1 ¸ÅÀÇ Á¤ÁöÈ­¸é»óÀ» Æ÷ÇÔÇϰí ÀÖ½À´Ï´Ù. Çȼ¿À» setPixels ¸Þ¼ÒµåÀÇ È£Ãâ·Î Á¤ÀÇÇÑ µÚ, Àü¼Û ÇØ¾ß ÇÒ µ¥ÀÌÅͰ¡ ¾ø¾îÁö¸é(ÀÚ), imageComplete ¸Þ¼Òµå¸¦ STATICIMAGEDONE Ç÷¡±× ÷ºÎ·Î È£ÃâÇÕ´Ï´Ù. ÀÌ ±âÁذú ´Ù¸¥ À̹ÌÁöÀÇ ¿¹´Â À¯Àú°¡ Á¶ÀÛÇÏ´Â 3D ·»´õ¸µÀÇ Ç¥½Ã³ª ºñµð¿À Ãâ·ÂÀÔ´Ï´Ù. ÀÌ·¯ÇÑ °¢ ÇÁ·¹ÀÓÀÇ ³¡¿¡´Â SINGLEFRAMEDONE Ç÷¡±×¸¦ »ç¿ëÇÏ´Â imageComplete ÀÇ È£ÃâÀÌ Áö½Ã¹Þ°í ÀÖ½À´Ï´Ù.

°ü·Ã Ç׸ñ:
setHints(int) , imageComplete(int) , Á¤¼ö ÇʵåÄ¡

IMAGEERROR

public static final int IMAGEERROR
À̹ÌÁöÀÇ »ý¼ºÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇß½À´Ï´Ù.

°ü·Ã Ç׸ñ:
imageComplete(int) , Á¤¼ö ÇʵåÄ¡

SINGLEFRAMEDONE

public static final int SINGLEFRAMEDONE
À̹ÌÁöÀÇ 1 ÇÁ·¹ÀÓÀÇ Àü¼ÛÀÌ ¿Ï·áÇß½À´Ï´Ù¸¸, ¾ÆÁ÷ Àü¼Û ´ë»óÀÇ ÇÁ·¹ÀÓÀÌ ÀÖ½À´Ï´Ù.

°ü·Ã Ç׸ñ:
imageComplete(int) , Á¤¼ö ÇʵåÄ¡

STATICIMAGEDONE

public static final int STATICIMAGEDONE
À̹ÌÁöÀÇ Àü¼ÛÀÌ ¿Ï·áÇØ, Àü¼Û ´ë»óÀÇ Çȼ¿µµ ÇÁ·¹ÀÓµµ ³²¾Æ ÀÖÁö ¾Ê½À´Ï´Ù.

°ü·Ã Ç׸ñ:
imageComplete(int) , Á¤¼ö ÇʵåÄ¡

IMAGEABORTED

public static final int IMAGEABORTED
À̹ÌÁö »ý¼ºÀÌ °íÀÇ·Î ÁߴܵǾú½À´Ï´Ù.

°ü·Ã Ç׸ñ:
imageComplete(int) , Á¤¼ö ÇʵåÄ¡
¸Þ¼ÒµåÀÇ »ó¼¼

setDimensions

public void setDimensions(int width,
                          int height)
setDimensions ¸Þ¼Òµå È£ÃâÀ» »ç¿ëÇØ, ¼Ò½º À̹ÌÁöÀÇ Å©±â¸¦ º¸°íÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
width - ¼Ò½º À̹ÌÁöÀÇ Æø
height - ¼Ò½º À̹ÌÁöÀÇ ³ôÀÌ

setProperties

public void setProperties(Hashtable  props)
ÀÌ À̹ÌÁö¿¡ °üÇØ¼­, È®Àå °¡´ÉÇÑ ÇÁ·ÎÆÛƼÀÇ ¸®½ºÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
props - ÀÌ À̹ÌÁö¿¡ °ü·ÃÁþ´Â ÇÁ·ÎÆÛƼÀÇ ¸®½ºÆ®

setColorModel

public void setColorModel(ColorModel  model)
setPixels ¸Þ¼Òµå¸¦ »ç¿ëÇØ º¸°íµÇ´Â Çȼ¿ÀÇ ´ëºÎºÐ¿¡ ´ëÇØ¼­ »ç¿ëµÇ´Â ColorModel ¿ÀºêÁ§Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. setPixels ¸Þ¼Òµå¿¡ ÀÇÇØ Àü¼Û µÇ´Â Çȼ¿¼¼Æ®´Â °¢°¢ ColorModel ¿ÀºêÁ§Æ®¸¦ Æ÷ÇÔÇϰí ÀÖÀ¸¹Ç·Î, Çȼ¿Ä¡ÀÇ Àü¼Û½Ã·Î ÁöÁ¤µÈ ColorModel ¸¸ÀÌ »ç¿ëµÇ´Â °ÍÀº ¾Æ´Ñ °Í¿¡ ÁÖÀÇÇØ ÁÖ¼¼¿ä. º¹¼öÀÇ ColorModel ¿ÀºêÁ§Æ®°¡ »ç¿ëµÇ´Â ¿¹·Î¼­´Â ÇÊÅÍ Ã³¸®µÇ´Â À̹ÌÁö°¡ ÀÖ½À´Ï´Ù. ÇÊÅÍ Ã³¸® ´ë»óÀÇ Çȼ¿¿¡ ¼öÁ¤À» ½Ç½ÃÇÒÁö ¾î¶³Áö¸¦ °áÁ¤ÇØ, ¼öÁ¤ ºÒ¿äÀÇ °æ¿ì´Â ¿øÀÇ ColorModel ¸¦ »ç¿ëÇØ, ¼öÁ¤ÇÏ´Â °æ¿ì´Â º¸´Ù ÇÊÅÍ Ã³¸®¿¡ ÀûÀýÇÑ ColorModel ¸¦ »ç¿ëÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
model - ÁöÁ¤µÈ ColorModel
°ü·Ã Ç׸ñ:
ColorModel

setHints

public void setHints(int hintflags)
ImageConsumer °¡ ImageProducer ·ÎºÎÅÍ Àü¼Û µÇ´Â Çȼ¿À» ó¸®Çϱâ À§Çؼ­ »ç¿ëµÇ´Â ÈùÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. ImageProducer ´Â ¾î¶°ÇÑ ¼ø¼­¿¡¼­µµ Çȼ¿À» Àü¼Û ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù¸¸, Çȼ¿ÀÇ Àü¼Û¿¡ ´ëÇÑ Á¤º¸¸¦ ImageConsumer ¿¡ °Ç³×ÁÙ ¼ö°¡ ÀÖÀ¸¸é, ImageConsumer ´Â ColorModel ¿¡ÀÇ Çȼ¿ÀÇ ½½Ä¶¸µÀ̳ª º¯È¯À» º¸´Ù ´É·üÀûÀÌ°í °íǰÁú¿¡ ½Ç½ÃÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. setHints ¸Þ¼ÒµåÀÇ Àμö°¡, Çȼ¿ÀÇ Àü¼Û ¹æ¹ý¿¡ °üÇÑ Á¤º¸ÀÇ ºñÆ® ¸¶½ºÅ©¸¦ °¡Áö¹Ç·Î, setPixels ¸Þ¼Òµåº¸´Ù Àü¿¡ setHints ¸Þ¼Òµå¸¦ È£ÃâÇÕ´Ï´Ù. ImageProducer °¡, ÀÌ °¡ÀÌµå ¶óÀο¡ µû¸£Áö ¾ÊÀº °æ¿ìÀÇ °á°ú´Â ÇÁ·ÎÅØ¼ÇµÇÁö ¾Ê½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
hintflags - ImageConsumer °¡ Çȼ¿ 󸮿¡ »ç¿ëÇÏ´Â ÈùÆ®¼¼Æ®

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel  model,
                      byte[] pixels,
                      int off,
                      int scansize)
À̹ÌÁöÀÇ Çȼ¿À» 1 ȸ ÀÌ»óÀÇ setPixels ¸Þ¼Òµå È£Ãâ¿¡ ÀÇÇØ Àü¼Û ÇÕ´Ï´Ù. °¢ È£ÃâÀº Çȼ¿ ¹è¿­¿¡ ÀúÀåµÇ°í ÀÖ´Â ¼Ò½º Çȼ¿ÀÇ À§Ä¡¿Í ±¸ÇüÀÇ Å©±â¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çȼ¿À» ÀûÀýÇÑ »ö°ú ¾ËÆÄ ¼ººÐÀ¸·Î º¯È¯ÇÏ·Á¸é , ÁöÁ¤µÈ ColorModel ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. (m, n ÀÇ À§Ä¡ÀÇ) Çȼ¿Àº À妽º (n * scansize + m + off)ÀÇ pixels ¹è¿­¿¡ ³õ¿©Áý´Ï´Ù. ÀÌ ¸Þ¼Òµå·Î Àü¼Û µÇ´Â Çȼ¿Àº ¸ðµÎ byte ·Î ÀúÀåµË´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
w - Çȼ¿ areaÀÇ Æø
h - Çȼ¿ areaÀÇ ³ôÀÌ
model - ÁöÁ¤µÈ ColorModel
pixels - Çȼ¿ÀÇ ¹è¿­
off - pixels ¹è¿­ÀÇ ¿ÀÇÁ¼Â(offset)
scansize - pixels ¹è¿­³»ÀÇ, ¾î´À Çȼ¿ÇàÀ¸·ÎºÎÅÍ ´ÙÀ½ÀÇ Çȼ¿Çà±îÁöÀÇ °Å¸®
°ü·Ã Ç׸ñ:
ColorModel

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel  model,
                      int[] pixels,
                      int off,
                      int scansize)
À̹ÌÁöÀÇ Çȼ¿Àº 1 ȸ ÀÌ»óÀÇ setPixels ¸Þ¼ÒµåÀÇ È£Ãâ¿¡ ÀÇÇØ Àü¼Û µË´Ï´Ù. °¢ È£ÃâÀº Çȼ¿ ¹è¿­¿¡ Æ÷ÇԵǴ ¼Ò½º Çȼ¿ÀÇ À§Ä¡¿Í ±¸ÇüÀÇ Å©±â¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çȼ¿À» ÀûÀýÇÑ »ö°ú ¾ËÆÄ ¼ººÐÀ¸·Î º¯È¯ÇÏ·Á¸é , ÁöÁ¤µÈ ColorModel ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇÕ´Ï´Ù. (m, n ÀÇ À§Ä¡ÀÇ) Çȼ¿Àº À妽º (n * scansize + m + off)ÀÇ pixels ¹è¿­¿¡ ³õ¿©Áý´Ï´Ù. ÀÌ ¸Þ¼Òµå·Î Àü¼Û µÇ´Â Çȼ¿Àº ¸ðµÎ int ·Î ÀúÀåµÇ°í ÀÖ½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
w - Çȼ¿ areaÀÇ Æø
h - Çȼ¿ areaÀÇ ³ôÀÌ
model - ÁöÁ¤µÈ ColorModel
pixels - Çȼ¿ÀÇ ¹è¿­
off - pixels ¹è¿­ÀÇ ¿ÀÇÁ¼Â(offset)
scansize - pixels ¹è¿­³»ÀÇ, ¾î´À Çȼ¿ÇàÀ¸·ÎºÎÅÍ ´ÙÀ½ÀÇ Çȼ¿Çà±îÁöÀÇ °Å¸®
°ü·Ã Ç׸ñ:
ColorModel

imageComplete

public void imageComplete(int status)
imageComplete ¸Þ¼Òµå´Â ImageProducer °¡ ¼Ò½º À̹ÌÁöÀÇ ¸ðµç Çȼ¿À» Àü¼Û ³¡¸¶ÃÆÀ» ¶§, ¸ÖƼ ÇÁ·¹ÀÓ ¾Ö´Ï¸ÞÀ̼ÇÀÇ 1 ÇÁ·¹ÀÓÀ» Àü¼Û ³¡¸¶ÃÆÀ» ¶§, ¶Ç´Â À̹ÌÁöÀÇ »ý¼ºÁß ¹× ·ÎµùÁß¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» ¶§¿¡ ºÒ·Á °©´Ï´Ù. ¿¬¼ÓÇϰí ÀÖ´Â ÇÁ·¹ÀÓÃø¿¡¼­ ImageConsumer °¡ ºÒÇÊ¿äÇϸé, ImageProducer ·Î µî·ÏµÈ ÄÁ½´¸Ó¸®½ºÆ®·ÎºÎÅÍ ImageConsumer ÀÚü¸¦ »èÁ¦ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
status - À̹ÌÁö ·Îµå »óÅÂ
°ü·Ã Ç׸ñ:
ImageProducer.removeConsumer(java.awt.image.ImageConsumer)

JavaTM 2
Platform
Std.  Ed.  v1. 4.0

¹ö±×ÀÇ º¸°í¿Í ±â´ÉÀÇ ¸®Äù½ºÆ®
ÀÌ¿ÜÀÇ API ·¹ÆÛ·±½º ¹× °³¹ßÀÚ¿ë ¹®¼­¿¡ ´ëÇØ¼­´Â Java 2 SDK SE °³¹ßÀÚ¿ë ¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. °³¹ßÀÚÀü¿ëÀÇ »ó¼¼ÇÑ ÇØ¼³, °³³äÀÇ °³¿ä, ¿ë¾îÀÇ Á¤ÀÇ, ¹ö±×ÀÇ È¸ÇÇÃ¥, ¹× ÄÚµå ½Ç·Ê°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

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.