* ¹®¼­ À§Ä¡: ±èÁߏ®È­¿ø ) °­Á ) ÄÄÇ»Å;ð¾î ) C¾ð¾î ÀÚ·á ) ÄÄÇ»ÅÍÀÇ ¸ðµç °Í
ùȭ¸éÀ¸·Î À§ÀÇ Â÷¸²À¸·Î À̵¿ ÀÌÀü ¹®¼­ÆÄÀÏ Àб⠵ÚÀÇ ¹®¼­ÆÄÀÏ Àбâ ÀÌ ¹®¼­ÀÇ Ã¹ ÁÙ·Î °¡±â
°­Á ÄÄÇ»ÅÍ ¾ð¾î

Á¦ 4 ºÎ

ÄÄÇ»ÅÍ ±×·¡ÇÈÀÇ ¸ðµç °Í

Á¶¼±´ëÇб³ ±Ý¼Ó°øÇаú ±è½Â¿­(Hitel, ³ª¿ì´©¸® : 73mania)

4ºÎ¿¡ ½Ç·Á ÀÖ´Â ±ÛµéÀº ÇÏÀÌÅÚ µÎ·ç¹° µ¿È£È¸(go mul)¿Í ³ª¿ì´©¸® ÇÁ·Î±×·¥ µ¿È£È¸(go prog)¿Í °¢Á¾ ÀâÁö µî À» ¸ð¾Æ¼­ Á¤¸®ÇÑ ±Û µéÀÌ´Ù. ¸¹Àº ºÎºÐÀÇ ¼Ò½º¸¦ ¼ö·ÏÇÏ·Á°í ÇßÁö¸¸ ÀÚ·á°¡ ¾ø¾ú´Ù±â º¸´Ù´Â ¸¹Àº ºÐ·® ¶§¹®¿¡ ´Ù ¼ö·ÏÇÏÁö ¸øÇß´Ù. ¸ÖƼ¹Ìµð¾î ½Ã´ë¿¡ ±×·¡ÇÈ ÇÁ·Î±×·¡¹Ö°ú ´õ ³ª¾Æ°¡ ºñµð¿À ÇÁ·Î±×·¡¹ÖÀº ÇÁ·Î±×·¡¸Ó·Î¼­ÀÇ Çʼö Á¶°ÇÀ̶ó°í »ý°¢ÇÑ´Ù.




1. °³·Ð

ÄÄÇ»ÅÍ ±×·¡ÇÈÀº ¹Ì±¹µµ 1970³â´ëºÎÅÍ º»°ÝÀûÀ¸·Î ¿¬±¸°¡ ½ÃÀ۵Ǿú°í, ÀϺ» ¶ÇÇÑ 1980³âºÎÅÍ ¹Ì±¹ÀÇ ±â¼úÀ» µµÀÔÇÏ¿© ½ÃÀ۵Ǿú´Ù. ´ç½Ã¿¡´Â ±×µé ¶ÇÇÑ ÄÄÇ»ÅÍ ±×·¡ÇÈÀº ÀϺΠÀü¹®°¡ÀÇ ¼ÒÀ¯¹°·Î ¹Û¿¡ »ç¿ëµÇÁö ¾Ê¾Ò´Ù. ±×·¯³ª 90³â´ë¿¡ µé¾î¼­¸é¼­ºÎÅÍ ÄÄÇ»ÅÍ ±×·¡ÇÈ ¼±Áø±¹ÀÎ ¹Ì±¹, ÀϺ», ÇÁ¶û½º, ij³ª´Ù »Ó¸¸ ¾Æ´Ï¶ó °úÇÐÀ̶õ °Í¿¡ °ü½ÉÀÌ ÀÖ´Â Àü¼¼°èÀÇ ±¹°¡¿¡¼­ ÄÄÇ»ÅÍ ¿µ»óÀÇ ´ëÁßÈ­°¡ ÀÌ·ç¾î Áö°í ÀÖ´Ù. ÀÌ Á¡Àº ÄÄÇ»ÅÍ ±×·¡ÇÈÀÌ ÀáÀ缺À» º¸¿©ÁÖ´Â Ãø¸éÀÌ´Ù.

ÀÌ·± Çö»óÀÇ ¹è°æ¿¡´Â IBM-PCµî Àüü ÄÄÇ»ÅÍ °¡°Ý Ç϶ôÀ¸·Î ¸ÅŲÅä½Ã¿¡¼­³ª º¼ ¼ö ÀÖ´ø ÄÄÇ»ÅÍ ±×·¡ÇÈÀÌ ½±°Ô »ç¿ëÀڵ鿡°Ô ´Ù°¡¿À°í ÀÖ´Ù´Â Á¡µµ °£°úÇÒ ¼ö ¾ø´Ù. 3D »ç¿¡¼­ ¸¸µç 3Â÷¿ø ¼ÒÇÁÆ®¿þ¾îÀÇ µ¶Ã¢ÀûÀΠâÁ¶¼ºµéÀÌ ¸Å¿ì ¿ì¼öÇØÁö°í Àֱ⠶§¹®ÀÌ´Ù. ÀÌÁ¦, ÇǺηΠ´À²¸Áö´Â ÄÄÇ»ÅÍ ¿µ»ó Ç¥ÇöÀº »ç¶÷µé °³°³ÀÎÀÌ »ó»óÇÒ ¼ö ÀÖ´Â ¸ÚÁø Àå¸éÀ¸·Î ±×·Á³¾ ¼ö ÀÖ¾î Àΰ£ÀÇ °¨Á¤Àû ¿å±¸¸¦ ½Ã°¢Àû, û°¢ÀûÀ¸·Î Ç¥ÇöÇØ ÁÖ´Â ÇØ°á»ç·Î µîÀåÇÑ ¼ÀÀÌ´Ù.

ÇÊÀÚ´Â ±×·¡ÇÈ µðÀÚÀ̳ʰ¡ ¾Æ´Ï´Ù. ´Ù¸¸ ÇÁ·Î±×·¥À» Çϴµ¥ À־ ±×·¡ÇÈ ÆÄÀÏ¿¡ ´ëÇØ¼­ ¾Ë¾Æ¾ß ÇÒ Çʿ䰡 ÀÖ´Ù. ¹°·Ð ±× Àü¿¡ ºñµð¿À Ä«µå¿¡ ´ëÇÑ Áö½ÄÀÌ ¸ÕÀú ÇÊ¿äÇÏÁö¸¸ ±× ºÎºÐÀº ÀÌ °÷¿¡¼­ ´Ù·ç±â¿¡´Â ³Ê¹« ±¤¹üÀ§ ÇϹǷΠÀÌ °÷¿¡¼­´Â °¢ ÆÄÀÏ Æ÷¸Ë¿¡ ´ëÇÑ °£·«ÇÑ ¼Ò°³¸¸ ÇÏ´Â °ÍÀ¸·Î ÇϰڴÙ.




2. PCX

IBM PC¿¡¼­ ºñÆ®¸Ê À̹ÌÁö¸¦ ó¸®Çϱâ À§ÇØ °¡Àå ³Î¸® »ç¿ëÇÏ´Â ÆÄÀÏ Æ÷¸ËÀÌ´Ù. °£´ÜÇÑ ÆäÀÎÆ® ÇÁ·Î±×·¥À¸·ÎºÎÅÍ DTP ÇÁ·Î±×·¥¿¡ À̸£±â±îÁö °¡Àå Æø³Ð°Ô »ç¿ëÇϰí ÀÖ´Ù. Æ÷¸Ë¿¡ ´ëÇÑ ÆÇ±ÇÀº PC Paintbrush·Î À¯¸íÇÑ Zsoft»ç°¡ ¼ÒÀ¯Çϰí ÀÖ´Ù. ¿ø·¡ 256 ¹Ì¸¸ÀÇ Ä÷¯¸¦ Áö¿øÇÏ¿´À¸³ª 1991³â 5.0 ¹öÀüÀ» ¹ßÇ¥Çϸ鼭 24ºñÆ® Ç® Ä®¶ó¸¦ Áö¿øÇÑ´Ù. ÆÄÀÏÀÇ ÃÖ´ë Å©±â´Â 64K ¡¿ 64K Çȼ¿ÀÌ´Ù.

2.1 PCX FileÀÇ ±¸Á¶

+-----------------------+

| | ¡ç Çì´õºÎºÐÀ¸·Î Image ÀÇ Å©±âµî °¢ Á¤º¸¿Í 16 Color Palette

| Header | Á¤º¸°¡ ¼ö·ÏµÇ¾î ÀÖ´Ù.

| |

+-----------------------+

| |

| |

| Image Data | ¡ç ½ÇÁ¦ À̹ÌÁö°¡ ÀúÀåµÈ ºÎºÐ. °£´ÜÇÏ°Ô ¾ÐÃàÀÌ µÇ¾îÀÖ´Ù.

| |

| |

+-----------------------+

| 256 Palette | ¡ç 256 Color ÀÏ °æ¿ì¿¡¸¸ Á¸ÀçÇϸç,

+-----------------------+ 256 Palette Á¤º¸°¡ ÀúÀåµÈ ºÎºÐ.

2.1.1 Header

Çì´õºÎºÐÀ» °£´ÜÇÏ°Ô struct ·Î ³ªÅ¸³»º¸¸é,

#define BYTE unsigned char

#define WORD unsigned int

typedef struct {

BYTE id;

BYTE version;

BYTE encoding;

BYTE bits_per_pixel;

WORD x1,y1,x2,y2;

WORD hres,vres;

BYTE palette[48];

BYTE reserved;

BYTE plane;

WORD bytes_per_line;

WORD palette_type;

BYTE not_used[58];

} PCXHEAD;

À̿Ͱ°ÀÌ ³ªÅ¸³¾ ¼ö ÀÖ´Ù. °¢ ¿ä¼Ò¸¦ Çϳª¾¿ »ìÆìº¸¸é¡¦

1. BYTE id : PCX File ÀÓÀ» ³ªÅ¸³»´Â ºÎºÐÀ¸·Î Á¤»ó È­ÀÏÀÏ °æ¿ì 0x0a ÀÇ °ªÀ» °¡Áø´Ù.

2. BYTE version : PCX Version ¹øÈ£¸¦ ³ªÅ¸³½´Ù. Version ¿¡ µû¶ó ¾ÐÃà ¹æ½ÄÀÌ ¾à°£¾¿ ´Þ¶óÁø´Ù°í Çϳª ÀÚ¼¼ÇÑ Á¤º¸´Â ¾ËÁö ¸øÇÑ´Ù.

3. BYTE encoding : ¾ÐÃàÀÌ µÇ¾îÀÖ´ÂÁö ¿©ºÎ¸¦ ³ªÅ¸³½´Ù. 0 ÀÌ¸é ¾ÐÃàÀÌ ¾ÈµÇ¾îÀÖÀ½À» ¶æÇÑ´Ù.±×·¯³ª ¾ÐÃàÀÌ µÇ¾îÀÖÁö ¾ÊÀº FileÀº ¾ø´Ù°í »ý°¢ÇÏ¸é µÈ´Ù. ±×·±µ¥ PCX File ÀÇ ¾ÐÃà ±â¹ýÀº ¿¾³¯ È£¶ûÀ̰¡ ´ë¸¶ÃÊ ÇÇ´ø 8 ºñÆ® ½ÃÀý¿¡ "·Îµå·±³Ê" ,"À§·ÎÀ§·Î" µîÀÇ È¯»óÀûÀÎ °ÔÀÓ¿¡¼­ Stage Data ÀÇ ÀúÀå ¹æ¹ý¿¡ ¾²ÀÌ´ø ¹æ¹ýÀε¥, ¾öû È¿À²ÀÌ ¶³¾îÁ®¼­, ½ÉÁö¾î´Â ¾ÐÃà ÇßÀ» ¶§ ¸ÂÃß¾î ±×¸²À» Ãâ·ÂÇØ ÁÖ´Â °æ¿ìµµ ÀÖ´Ù.

4. BYTE palette[48] : 16 Color ÀÇ palette °¡ RED, GREEN, BLUE, RED, GREEN¡¦ ¼øÀ¸·Î ÀúÀåµÈ ºÎºÐÀÌ´Ù. ±×·±µ¥, ÀÌ ºÎºÐÀº °¢ ¿ä¼Ò´ç 8bit ¸¦ ¸ðµÎ »ç¿ëÇÏ¿©, °¢°¢ 256 level ¾¿ ³ªÅ¸³»°íÀÖ´Ù. 16Color mode ¿¡¼± »öÀ» ¸ðµÎ ÇÕÇØºÁ¾ß 64 »öÀ̰í, 25¸ðµå¿¡¼­µµ °¢ 6bit ¾¿¸¸ »ç¿ëÇϹǷΠ¾Æ±õÁö¸¸ ¾öû ¹ö·Á¾ß ÇÑ´Ù.

5. BYTE plane : È­¸éÀÇ Æò¸é ¼ö¸¦ ³ªÅ¸³½´Ù. bits_per_pixel °ú ÀÌ plane ¸¦ Á¶ÇÕÇÏ¿© È­ÀÏÀÇ

Color ¼ö¸¦ ¾ò¾î³¾ ¼ö ÀÖ´Ù.

6. WORD bytes_per_line : ÇÑ ¶óÀÎ´ç ¹ÙÀÌÆ® ¼ö¸¦ ³ªÅ¸³½´Ù. ±×·±µ¥, À̰ÍÀº ÇϳªÀÇ plane ¸¦ ±âÁØÀ¸·Î Ç߱⠶§¹®¿¡ ½ÇÁ¦ ¶óÀÎ´ç ¹ÙÀÌÆ®´Â bytes_per_line ¡¿ plane ÀÌ µÈ´Ù. ÀÌ°Ç decoding ÈÄÀÇ ¹ÙÀÌÆ® ¼ö¸¦ ¸»ÇÑ´Ù.

7. WORD palette_type

2.1.2 Image Data ºÎºÐ

ÀÌ ºÎºÐÀÌ ½ÇÁ¦ À̹ÌÁö°¡ ÀúÀåµÈ ºÎºÐÀ¸·Î °£´ÜÇÑ ¹æ¹ýÀ¸·Î ¾ÐÃàµÇ¾î ÀÖ´Ù. Ȥ 8bit °¡ ¾öû ÆÇÄ¡´ø ½ÃÀý¿¡ ±× ¼¼±âÀÇ ¸íÀÛÀÎ "·Îµå·±³Ê" ³ª ±× ¾Æ·ùÀÛÀÎ "À§·ÎÀ§·Î" ÀÇ ÆÇÀ» °³Á¶ÇϽ÷Á ÇϽŠºÐµéÀº ¾Æ½ÇÅÙµ¥ ¹Ù·Î ±× ¾ÐÃà¹ýÀÌ´Ù. ¾ÆÁÖ °£´ÜÇÑ ¹æ¹ýÀÌ´Ù. °°Àº µ¥ÀÌŸ°¡ ¿©·¯¹ø ¹Ýº¹ µÉ °æ¿ì ±× ȸ¼ö¿Í µ¥ÀÌŸ·Î ³ªÅ¸³»´Â ¹æ¹ýÀÌ´Ù. ±×·±µ¥ ¿©±â¼­ "¹Ýº¹ÇÑ´Ù~!" ¶ó´Â°É ³ªÅ¸³» ÁÖ¾î¾ß Çϴµ¥, À̰ÍÀº ÃÖ»óÀ§ µÎ bit ¸¦ Set ÇÏ¿© ³ªÅ¸³½´Ù.

Áï °è¼Ó Àо°¡´Ù°¡ ¸¸¾à ÀÐÀº µ¥ÀÌŸ°¡ 11000000b( 0xc0 ) º¸´Ù Å©¸é ³ª¸ÓÁö ºñÆ®°¡ ¹Ýº¹ ȸ¼ö¸¦ ³ªÅ¸³»°í, ´ÙÀ½ ¹ÙÀÌÆ®°¡ ¹Ýº¹µÉ µ¥ÀÌŸ¸¦ ³ªÅ¸³»°Ô µË´Ï´Ù.

¿¹¸¦µé¾î µ¥ÀÌŸ°¡ ´ÙÀ½°ú °°ÀÌ ÀúÀåµÇ¾î ÀÖ°í, ÀÌ°É Ç®¾îÇìÄ¡¸é,

0x22 ¡æ 0x22

0x4b ¡æ 0x4b

0xc3 ¡æ 3¹ø ¹Ýº¹

0x44 ¡æ 0x44 0x44 0x44

0x3c ¡æ 0x3c

0xc4 ¡æ 4 ¹ø ¹Ýº¹

0x22 ¡æ 0x22 0x22 0x22 0x22

0x34 ¡æ 0x34

ÀÌ·¸°Ô ÇØ¼®µÈ´Ù.

°£´ÜÇÏ°Ô ¿¹·Î ¶óÀδÜÀ§·Î Àо ÇØ¼®ÇÏ´Â ·çƾÀ» ¸¸µé¾îº¸¸é,

* BytePerLine : ¶óÀÎ´ç ¹ÙÀÌÆ® ¼ö.

/********************************************************/

void PCXLine2Buf(FILE *PCX,byte *buf)

/********************************************************/

{

int count,data,i;

for(i=0;i<BytePerLine;i++) { // ÇѶóÀÎÀ» ÀÐÀ»¶§ ±îÁö..

data=fgetc(PCX) & 0xff; // int ÇüÀ̹ǷΠ»óÀ§¹ÙÀÌÆ®´Â ¹ö¸®°í.

if((data & 0xc0)==0xc0) { // ¸¸¾à »óÀ§ µÎ ºñÆ®°¡ 1 À̸é

count=data & 0x3f; // ¹Ýº¹ ȸ¼ö ¼³Á¤

data=fgetc(PCX); // µ¥ÀÌŸ¸¦ Àаí

whichar)data; // ¾Æ´Ï¸é ±×³É ³Ö´Â´Ù.

}

}

}

±×·±µ¥, »ç½Ç ÀÌ·¸°Ô ÀÐÀ¸¸é ³Ê¹« ´À·Á¼­ ¾Æ¸¶ Å« ±×¸²À» ´Ù º¸·Á¸é ½Ã°£ÀÌ ³Ê¹« ¸¹ÀÌ ¼Ò¿äµÉ °ÍÀÌ´Ù. ºü¸£°Ô ÇÏ·Á¸é, ù° ¿ì¼± Stream À» »ç¿ëÇÏÁö ¸»°í, Á÷Á¢ File Handle ·Î Access ÇØ¾ß Çϰí, ´ÙÀ½Àº Çѹø¿¡ ¿Õâ Àо, ¹Ì¸® Buffer ¿¡ ´ã¾Æ ³õ°í, ±×°É Àо ÇØ¼®ÇÏ½Ã¸é ºü¸¦ °ÍÀÌ´Ù.

2.2 256 Ä®¶ó PCX ÀÇ Ãâ·Â

¿ì¼±, VGA ÀÇ 256Ä®¶ó ¸ðµå¿¡ ´ëÇØ ¾à°£ ¾Ë¾Æº¸±â·Î ÇϰڴÙ. Ç¥ÁØ VGA ¿¡¼­´Â ¸ðµå ¹øÈ£ 13H ·Î 320¡¿200 256 Ä®¶ó°¡ Ç¥ÁØÀ¸·Î µÇ¾îÀÖ´Ù. ¿äÁò ¾öû ¸¹ÀÌ ½ñ¾ÆÁö°í ÀÖ´Â SuperVGA ¿¡¼­´Â º¸Åë 1024¡¿768 256 Ä®¶ó ±îÁö Áö¿øÇÏÁö¸¸ ½´ÆÛ VGA °¡ Ç¥ÁØÀÌ ¾ÆÁ÷ Á¦´ë·Î ¾È ÀâÇô À־, ¿©±â¼­´Â 320¡¿200 256 Ä®¶ó¸¦ ±âÁØÀ¸·Î ¼³¸íÀ» ÇϰڴÙ.

±×·³ ¿ì¼± VGA ¿¡¼­ 256 Color ¸ðµå·Î ÀüȯÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æº¸µµ·Ï ÇϰڴÙ. ¸ðµå ¼¼ÆÃÀº Ưº°ÇÑ °æ¿ì°¡ ¾Æ´Ï¸é BIOS ¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÌ Æí¸®ÇÏ´Ù. ¸ðµå ¼¼ÆÃÀº ROM BIOS INT 10H Áß ¼­ºñ½º 00H ¸¦ ÀÌ¿ëÇÏ¿© ¹Ù²Ü ¼ö ÀÖ´Ù. °£´ÜÈ÷ 256Ä®¶ó ¸ðµå·Î ¼¼ÆÃÇÏ´Â ¿¹¸¦ º¸¸é,

asm {

mov ah,00h // ¼­ºñ½º 0 ( ¸ðµå ¼¼ÆÃ )

mov al,13h // 320x200 256 Color Mode

int 10h // Call.. BIOS Interrupt 10h

}

º¸Åë ÀÌ·¸°Ô ÇÏ¸é ¼¼ÆÃÀÌ µÈ´Ù. ÀÌ·¸°Ô Çϸé 320¡¿200 256Ä®¶ó ¸ðµå·Î ÀüȯÀÌ µÈ´Ù. ¿©±â¼­ ºñµð¿À ¸Þ¸ð¸®´Â a000:0000 ºÎÅÍ ½ÃÀÛÇÑ´Ù. È­¸é¿¡¼­ ƯÁ¤ ÁÂÇ¥(x,y)ÀÇ ¹øÁö¸¦ ±¸ÇÏ·Á¸é,

0xa0000000 + y¡¿320 + x ÇÏ¸é µÈ´Ù.

°£´ÜÈ÷ Á¡Âï´Â ÇÔ¼ö¸¦ ¸¸µé¾î º¸¸é,

void SetPixel256(unsigned x,unsigned y,unsigned char color)

{

if(x<320 && y<200) { // ¹üÀ§ °Ë»ç..

*(char far *)(0xa0000000+(long)y*320+x)=color;

}

}

´ëÃæ À̿Ͱ°ÀÌ ÇÏ¸é º° ¹«¸® ¾øÀÌ µÇ¸®¶ó »ý°¢µÈ´Ù.

±×·³ º»°ÝÀûÀ¸·Î 256 Color PCX È­ÀÏÀÇ Decoding ¿¡ ´ëÇØ ¾Ë¾Æº¸µµ·Ï ÇϰڴÙ. ¿ì¼± File ¿¡¼­ Header ºÎºÐÀ» Àд ÇÕ¼ö¸¦ ¸¸µé¾î º¸µµ·Ï ÇϰڴÙ. Çì´õ´Â ¾Õ¿¡¼­ ¸»ÇÑ ¹Ù¿Í °°ÀÌ ´ÙÀ½°ú °°´Ù.

#define WORD unsigned int

#define BYTE unsigned char

typedef struct {

BYTE id;

BYTE version;

BYTE encoding;

BYTE bits_per_pixel;

WRD x1,y1,x2,y2;

WORD hres,vres;

BYTE palette[48];

BYTE reserved;

BYTE plane;

WORD bytes_per_line;

WORD palette_type;

BYTE not_used[58];

} PCXHEAD;

À̺κÐÀº È­ÀÏÀÇ Ã¹ ºÎºÐ¿¡ À§Ä¡ÇϹǷΠȭÀÏÀÇ Ã³À½ºÎÅÍ Çì´õÀÇ Å©±â¸¸Å­ ±×³É ÀÐÀ¸¸é µÈ´Ù.

char ReadPCXHead(int Handle,PCXHEAD *Header)

{

lseek(Handle,0L,SEEK_SET); // È­ÀÏÀÇ Ã¹ ºÎºÐÀ¸·Î À̵¿

if(_read(Handle,Header,sizeof(PCXHEAD))==-1) return READ_ERR;

// ÀÐ°í ¿¡·¯°¡ ÀÖÀ¸¸é ¸®ÅÏ.

return NO_ERR;

}

¿©±â¼­ Handle Àº _open À̳ª open À¸·Î È­ÀÏÀ» ¿­¾úÀ» °æ¿ìÀÇ È­ÀÏ ÇÚµéÀÌ´Ù.

±× ´ÙÀ½Àº Çì´õ¸¦ ÀÌ¿ëÇØ¼­ ÀÌ È­ÀÏÀÇ Ä®¶ó ¼ö¸¦ ¾ò´Â ¹æ¹ýÀÌ´Ù. Ä®¶ó´Â bits_per_pixel °ú plane À¸·Î ¾Ë ¼ö ÀÖ´Ù. bits_per_pixel °ú plane °¡ °¢°¢ 1 À϶§ 2 Ä®¶óÀ̰í, bits_per_pixel ÀÌ 1 Áõ°¡ÇÒ ¶§¸¶´Ù Ä®¶ó¼ö´Â 2¹è°¡ µÇ¾î¾ß Çϰí, plane ÀÌ 1 Áõ°¡ÇÒ¶§¸¶´Ù ¿ª½Ã Ä®¶ó¼ö°¡ 2¹è°¡ µÇ¾î¾ß ÇÑ´Ù. µû¶ó¼­ Ä®¶ó¼ö´Â ´ÙÀ½°ú °°ÀÌ °è»êÇÏ¸é °£´ÜÇÏ´Ù.

unsigned GetPCXColor(PCXHEAD Head)

{

return ((1<<Head.bits_per_pixel)*(1<<Head.plane))/2);

}

±×ÈÄ ¸¸¾à¿¡ 256 Ä®¶óÀ̸é È­ÀÏÀÇ ³¡ºÎºÐ¿¡ 256 Color ÆÄ·¹Æ®°¡ Á¸ÀçÇÑ´Ù. ÀÌ ÆÄ·¹Æ®´Â ÇÑ Ä®¶ó´ç Red, Green, Blue ÀÇ ¼¼ ¹ÙÀÌÆ®¾¿ ÀúÀåµÇ¾î ÀÖ´Ù. µû¶ó¼­ ÃÑ ÆÄ·¹Æ®ÀÇ Å©±â´Â 256¡¿3 Byte °¡ µÈ´Ù. ±×·±µ¥, PCX File ¿¡ ÀúÀåµÈ ÆÄ·¹Æ®´Â Red, Green, Blue °¢°¢ 8bit ·Î ÀúÀåµÇ¾î ÀÖÀ¸³ª, ½ÇÁ¦ VGA ¿¡¼­ÀÇ ÆÄ·¹Æ®´Â ÇÏÀ§ 6 ºñÆ®¸¸ »ç¿ëµÇ¹Ç·Î ÆÄ·¹Æ®¸¦ ¼¼ÆÃÇϱâ Àü¿¡ ¿ì·Î µÎ ºñÆ®¸¦ ½¬ÇÁÆ® ½ÃÄÑÁÖ¾î¾ß ÇÑ´Ù.

typedef struct {

BYTE red;

BYTE green;

BYTE blue;

} RGB;

char ReadPCXPalette(int Handle,RGB *pal)

{

WORD i;

lseek(Handle,-(long)(sizeof(RGB)*256),SEEK_END);

// È­ÀÏ ³¡¿¡¼­ ¾ÕÂÊÀ¸·Î 256¡¿3 byte À̵¿..

if(_read(Handle,(char *)pal,sizeof(RGB)*256)==-1) return READ_ERR;

// Àаí, ¿¡·¯°¡ ÀÖÀ¸¸é ¸®ÅÏ..

for(i=0;i<256;i++) { // ¿ì·Î µÎºñÆ® ½¬ÇÁÆ®..

pal[i].red >>= 2;

pal[i].green>>= 2;

pal[i].blue >>= 2;

}

return NO_ERR;

}

±× ´ÙÀ½Àº ÀÐÀº ÆÄ·¹Æ® Å×ÀÌŸ·Î ½ÇÁ¦ ÆÄ·¹Æ®¸¦ ¼¼ÆÃ½ÃÄÑ ÁÖ¾î¾ß ÇÑ´Ù. ÆÄ·¹Æ® ¼¼ÆÃÀº ROM BIOS Interrupt 10h ÀÇ ¼­ºñ½º 10h ¸¦ ÀÌ¿ëÇÏ¿© Çϵµ·Ï ÇϰڴÙ.

void SetPalette256(RGB *pal)

{

asm {

les dx, DWORD PTR pal

// es:dx = Palette data

xor bx, bx // bx = 0

mov cx, 256 // 256 °³

mov ax, 1012h // Service 10h , Subservice 12h

int 10h // Call Interrupt 10h

}

}

ÀÌÁ¦ ³²Àº ÀÏÀº ½ÇÁ¦ µ¥ÀÌŸ¸¦ Àаí, ÇØ¼®Çؼ­ È­¸é¿¡ »Ñ¸®±â¸¸ ÇÏ¸é µÈ´Ù. ¾ÐÃà¹ýÀº Àü¿¡ ¼³¸íÇßÀ¸¹Ç·Î »ý·«Çϰí, ½ÇÁ¦ Àаí ÇØ¼®ÇÏ´Â ºÎºÐ¸¸ º¸±â·Î ÇϰڴÙ.

#define MAXBUF 32768

static BYTE *ReadBuf; // ÀÐÀº µ¥ÀÌŸ°¡ ÀúÀåµÉ ºÎºÐ

static WORD BufSize=0; // ½ÇÁ¦ ÇÒ´ç µÈ ¸Þ¸ð¸® Å©±â

static WORD ReadPos; // µ¥ÀÌŸ Áß ´ÙÀ½¿¡ ÇØ¼®µÉ À§Ä¡

static char Repeat=1; // ¹Ýº¹µÉ ¼ö

char ReadPCXInit(void) // ¹öÆÛ¿¡ ¸Þ¸ð¸®¸¦ ÇÒ´ç¹Þ´Â´Ù

{

WORD FreeMem;

FreeMem=(WORD)co=eleft(); // ÇÒ´ç ¹ÞÀ» ¼ö ÀÖ´Â ÃÖ´ë ¸Þ¸ð¸®

if(FreeMem<MAXBUF) {

ReadBuf=(char *)malloc(FreeMem);

BufS ze=FreeMem;

} else {

ReadBuf=(char *)malMoc(MAXBUF);

BufSize=MAXBUF;

}

ReadPos=BufSize;

if(ReadBuf==NULL) return MEM_ERR;

return NOtERR;

}

void ReadPCXEnd(void) // ¹öÆÛ¿¡ ÇÒ´ç¹ÞÀº ¸Þ¸ð¸®¸¦ ÇØÁ¦ÇÑ´Ù.

{

free(ReadBuf);

}

char ReadPCX(int Handle,BYTE *buf,WORD size)

// ¾ÐÃàÀ» Ç®°í, ÁöÁ¤ÇÑ size ¸¸Å­ÀÇ µ¥ÀÌŸ¸¦ ÀдÂ

{

BYTE c,data;

WORD i;

for(i=0;i<size;i++) { // ÁöÁ¤ÇÑ ±æÀÌ ¸¸Å­

if(ReadPos==BufSize) { // ÀÐÀº µ¥ÀÌŸ¸¦ ¸ðµÎ ÇØ¼®ÇßÀ¸¸é,

if(read(Handle,ReadBuf,BufSize)==-1) return READ_ERR;

// ´ÙÀ½ µ¥ÀÌŸ¸¦ BufSize ¸¸Å­ Àд´Ù.

ReadPos=0;

}

if(--Repeat <= 0) // ´õÀÌ»ó ¹Ýº¹µÇÁö ¾ÊÀ» °æ¿ì

{

c=ReadBuf[ReadPos++]; // ´ÙÀ½ µ¥ÀÌŸ¸¦ ¾ò°í,

if(ReadPos==BufSize) {

if(read(Handle,ReadBuf,BufSize)==-1) return READ_ERR;

ReadPos=0;

}

if((c & 0xc0)==0xc0) { // ¹Ýº¹Àΰ¡?

Repeat=c & 0 3f; // ¹Ýº¹µÉ ¼ö

data=ReadBuf[ReadPos++]; // ¹Ýº¹µÉ µ¥ÀÌŸ.

} else { // ¾Æ´Ï¸é,

Repeat=1; // Çѹø¸¸

daBa=c; // ÀÐÀº µ¥ÀÌŸ·Î.

}

}

buf[i]=data; // ÀúÀå

}

return NO_ERR;

}

¼Óµµ¸¦ ºü¸£°Ô Çϱâ À§Çؼ­, È­ÀÏ ÇÚµéÀ» ÀÌ¿ëÇß°í, Çѹø¿¡ ¿Õâ Àо ¹öÆÛ¿¡ ´ã¾Æ ³õ°í ÇØ¼®ÇÏ´Â ¹æ¹ýÀ» »ç¿ëÇß´Ù. ÀÌÁ¦ Àд ·çƾÀÌ ¿Ï¼ºÀÌ µÇ¾úÀ¸¸é, ÀÌÁ¦ È­¸é¿¡ »Ñ¸®±â¸¸ ÇÏ¸é µÈ´Ù.

¿ì¼± 256 Color Mode ·Î Àüȯ½ÃÄÑ ³õÀº ÈÄ¡¦

char PCXView256(char *fname)

{

int Handle;

BYTE *buf;

RGB *pal;

PCXHEAD Head;

char r;

register WORD x,y;

WORD Hlen,Vlen;

if((Handle=_open(fname,0))==-1) return FILE_NOT_FOUND;

// È­ÀÏÀ» ¿­°í

if((pal=(RGB *)malloc(sizeof(RGB)*256))==NULL) {

// ÆÄ·¹Æ®°¡ ÀúÀåµÉ °÷À» ÇÒ´ç¹Þ°í

_close(Handle);

return MEM_ERR;

}

if((r=ReadPCXPalette(Handle,pal))!=NO_ERR) {

// ÆÄ·¹Æ®¸¦ Àд´Ù

_close(Handle)

free(pal);

return r;

}

if((r=ReadPCXHead(Handle,&Head))!=NO_ERR) {

// Çì´õ¸¦ Àд´Ù

_close(Handle);

fre.(pal);

return r;

}

if(GetPCXColor(Head)!=256) {

// 256 Ä®¶ó È­ÀÏÀΰ¡ °Ë»çÇØ¼­ ¾Æ´Ï¸é ºüÁ®³ª°¨

_close(Handle);

free(pal);

return NOT_256;

}

if((buf=(BYTE *)malloc(Head.bytes_per_line))==NULL) {

// ÇÑ ¶óÀÎÀÇ µ¥ÀÌŸ°¡ ÀúÀåµÉ ¹öÆÛ¸¦ ÇÒ´ç.

_close(Handle);

free(pal);

return MEM_ERR;

}

SetPalette256(pal); // ÆÄ·¹Æ®¸¦ ¼¼ÆÃ

Rea PCXInit(); // È­ÀÏÀ» ÀÐÀ» ¹öÆÛ¸¦ ÃʱâÈ­

Hlen=Head.x2-Head.x1+1; // À̹ÌÁöÀÇ °¡·Î ±æÀÌ

Vlen=Head.y2-Head.y1+1; // À̹ÌÁöÀÇ ¼¼·Î ±æÀÌ

for(y=0;y<=grMaxY && y<Vlen;y++) {

if((r=ReadPCX(Handle,buf,Head.bytes_per_line))!=NO_ERR) {

// ÇÑ ¶óÀÎÀ» Àд´Ù

ReadPCXEnd();

_close(Handle);

free(pal);

free(buf);

return r;

}

for(x=0;x<grMaxX && x<Hlen;x++) {

SetPixel256(x,y,buf[x]);

// ÀÐÀº ¶óÀÎÀ» È­¸é¿¡ »Ñ¸°´Ù

}

}

ReadPCXEnd(); // ¹öÆÛ ÇØÁ¦

_close(Handle);

free(pal);

free(buf);

return NO_ERR;

}

2.3 256 Color PCX File ¥±

ÀÌ Àå¿¡¼­´Â 256 color PCX File ¿©·¯ ±×¸²À» µ¿½Ã¿¡ ÇÑ È­¸é¿¡ º¼ ¼ö ÀÖ´Â ¹æ¹ýÀ» ¾Ë¾Æº¸°Ú´Ù. 256Ä®¶ó PCX È­ÀÏÀÏ °æ¿ì ±× ±×¸²À» Á¦´ë·Î º¸·Á¸é 256»öÀÇ Palette ¸¦ ¸ðµÎ ¹Ù²ãÁÖ¾î¾ß Çϱâ 飁¹®¿¡ µ¿½Ã¿¡ µÎ ±×¸²À» ÇÑ È­¸é¿¡ º¸·Á°í Çϸé, ¸ÕÀú ¶ç¿î ±×¸²ÀÌ ³ªÁß¿¡ ¶Ù¿î ±×¸²ÀÇ Palette ¿¡ ¿µÇâÀ» ¹Þ¾Æ È­¸éÀÌ ¾û¸ÁÀÌ µÈ´Ù. °á±¹ ¿©·¯ ±×¸²À» °è¼Ó ÇÑ È­¸é¿¡ ¶ç¿ì¸é Á¦ÀÏ ¸¶Áö¸·¿¡ ¶ç¿î ±×¸²¸¸ÀÌ Á¦´ë·Î º¸ÀÌ°Ô µÇ´Â °ÍÀÌ´Ù.

ÀÌ ¹®Á¦¸¦ ÇØ°áÇÏ´Â ¹æ¹ýÀº ¿©·¯°¡Áö°¡ ÀÖÀ» ¼ö ÀÖ´Ù.

ù° ¹æ¹ýÀº 256Color ¸ðµå·Î ¹Ù²Ù¾úÀ»¶§ ÀÚµ¿À¸·Î ¼³Á¤µÇ´Â Default Palette ¿¡ ¸ÂÃß¾î µð´õ¸µÀ» ÇØ ÁÖ´Â ¹æ¹ýÀÌ´Ù. ÀÌ ¹æ¹ýÀ» ÀÌ¿ëÇϸé 16 Color ¸ðµå¿¡¼­µµ 256 Color ÀÇ È­ÀÏÀ» °°Àº ¹æ¹ýÀ¸·Î º¼ ¼ö ÀÖ´Ù´Â ÀåÁ¡ÀÌ ÀÖÀ¸³ª, ÁúÀÌ ¸Å¿ì ¶³¾îÁö°Ô µÈ´Ù.

µÎ¹øÂ° ¹æ¹ýÀº ¿ø·¡´Â ÀÚ¿¬ »öÀ» 256 Color ·Î ¹Ù²Ü¶§ ¾²ÀÌ´Â ¹æ¹ýÀε¥, ¶ç¿ï PCX È­Àϵ鿡¼­ ¿ì¼± Palette ¸¸ ¸ðµÎ »Ì¾Æ³½ÈÄ, ±× Áß¿¡¼­ Àüü¸¦ ´Ù º¸¿©ÁÙ ¼ö ÀÖ´Â ÃÖÀûÀÇ Palette 256 °³¸¦

±¸ÇÑÈÄ ±× Palette ¸¦ ÀÌ¿ëÇÏ¿© ±×¸²À» ÇѲ¨¹ø¿¡ Ãâ·ÂÇÏ´Â ¹æ¹ýÀÌ´Ù. ÀÌ ¹æ¹ýÀº ÀüüÀûÀ¸·Î ÁÁÀº È­ÁúÀ» ³ªÅ¸³»³ª, ±×¸²À» ¶ç¿ì±â Àü¿¡ È­ÀÏÀ» ¸ðµÎ ÇѲ¨¹ø¿¡ ó¸®Çϱ⠶§¹®¿¡, ¹ø°Å·Ó°í, ¼Óµµµµ ¸¹ÀÌ ¶³¾îÁø´Ù.

¼¼¹øÂ° ¹æ¹ýÀº ÇϳªÀÇ ±×¸²À» ¿ì¼± ¶ç¿îÈÄ, ±× ±×¸²ÀÇ Palette ¸¦ ÀÌ¿ëÇÏ¿© ´Ù¸¥ ±×¸²À» ¶ç¿ì´Â ¹æ¹ýÀÔ´Ï´Ù. ÀÌ ¹æ¹ýÀº ¿ì¼± ¼Óµµ°¡ ºü¸£´Ù´Â ÀåÁ¡ÀÌ ÀÖ°í, Áúµµ ¿ì¼öÇÑ ÆíÀ̳ª, ¸¸¾à óÀ½¿¡ ¶ç¿î ±×¸²ÀÌ Æ¯Á¤ »ö»ó¸¸ ÁÖ·Î »ç¿ëÇÏ´Â ±×¸²À̶ó¸é(¿¹¸¦µé¾î Àå¹Ì±×¸² µûÀ§¡¦) ³ªÁßÀÇ ¶ç¿ì´Â ±×¸²ÀÇ ÁúÀÌ ¾öû ¶³¾îÁö°Ô µË´Ï´Ù. ÀÌ ¹æ¹ýÀº °°Àº Á¾·ùÀÇ ±×¸²µé ¿¹¸¦µé¾î Àι° »çÁøµîÀÇ ±×¸²À» ¶ç¿ï¶§ È¿°ú¸¦ ¹ßÈÖÇÑ´Ù.

À̰÷¿¡¼­ »ìÆìº¼ ¹æ¹ýÀº 3¹øÂ° ¹æ¹ýÀÌ´Ù. ÀÌ ¹æ¹ýÀº °£´ÜÇÏ°Ô ÀÌ¹Ì ¼³Á¤µÈ Palette Áß °¡Àå °¡±î¿î »öÀ» »Ì¾Æ³»´Â ¹æ¹ýÀÌ´Ù. ¿ì¼± °³¿ä¸¸ Áý°í ³Ñ¾î°¡¸é ÇѰ¡Áö »öÀº Red, Green, Blue ÀÇ ¼¼°¡Áö »öÀ¸·Î ºÐÇØµÉ ¼ö ÀÖ´Ù. VGA ¿¡¼­µµ Palette ¸¦ ¹Ù²Ü¶§, ÀÌ »¡, ÃÊ, ÆÄ ÀÇ ¼¼°¡Áö ³óµµ(?)¸¦ ¹Ù²Ù¾î¼­ º¯°æ½ÃŲ´Ù. Áï R,G,B °¡ ¸ðµÎ 0 À϶§´Â °ËÀº»öÀÌ°í ¸ðµÎ 63 À϶§´Â ÇϾá»öÀ» ³ªÅ¸³»°Ô µÈ´Ù. À̰ÍÀº R, G, B ¸¦ °¢°¢ ÃàÀ¸·Î ÇÏ´Â 3Â÷¿ø °ø°£À¸·Î »ý°¢ÇÒ ¼ö ÀÖ´Ù. ±×¸®°í ÇϳªÀÇ »öÀº ±× 3Â÷¿ø °ø°£ÀÇ ÇÑ Á¡À¸·Î »ý°¢µÉ ¼ö ÀÖ´Ù. ÀÌ·¸°Ô »ý°¢ÇÏ¸é Æ¯Á¤ »ö°ú °¡Àå °¡±î¿î »öÀº ±× »öÀÌ ³ªÅ¸³»´Â Á¡°ú °¡Àå °¡±î¿î Á¡ÀÌ µÈ´Ù. ÀÌ °ÍÀº Á¡°ú Á¡ »çÀÌÀÇ °Å¸®¸¦ ±¸ÇÏ¿© ÃÖ¼Ò°ªÀ» ±¸ÇÏ¸é µÈ´Ù. 3Â÷¿ø °ø°£¿¡¼­ Á¡°ú Á¡ »çÀÌÀÇ °Å¸®´Â

SQRT{ (x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2 }

ÀÌ µÈ´Ù. ±×·±µ¥ ¿©±â¼­ °¢ ÃàÀ» R, G, B ·Î º»´Ù¸é

SQRT{ (R1 - R2)^2 + (G1 - G2)^2 + (B1 - B2)^2 }

ÀÌ µÈ´Ù. ±×·±µ¥ ¿©±â¼­´Â Àý´ëÀûÀÎ °Å¸®°¡ ÇÊ¿äÇÏÁö ¾Ê°í, »ó´ëÀûÀÎ °Å¸®ÀÇ ºñ°¡ ÇÊ¿äÇϹǷÎ,

SQRT{ }

´Â »ý·«ÀÌ °¡´ÉÇÏ´Ù. Áï

(R1 - R2)^2 + (G1 - G2)^2 + (B1 - B2)^2


±×·±µ¥,

(xx1-xx2)^2

Àº ㅼ

xx1-xx2

ㅼ¿Í ºñ·ÊÇÑ´Ù.

Áï, ㅼ

R1-R2

ㅼ + ㅼ

G1-G2

ㅼ + ㅼ

B1-B2

ㅼ À̰͸¸ ÀÖÀ¸¸é °¡Àå °¡±î¿î »öÀ» ±¸ÇÒ ¼ö ÀÖ´Ù. ´Ù½Ã ¼³¸íÇÏÀÚ¸é, ÀÌ ¹æ¹ýÀº ¸ÕÀú ¼³Á¤µÈ Palette Áß ³ªÁß¿¡ ¶ç¿ï ±×¸²ÀÇ Palette ¿¡ °¡Àå °¡±î¿î »öÀ» ±¸ÇØ ±× »öÀ¸·Î ±×¸²À» ¶ç¿ì´Â ¹æ¹ýÀÌ´Ù.

±×·³ 256Ä®¶ó Palette º¸Á¤¿¡ ´ëÇÏ¿© ½ÇÁ¦·Î ÇÁ·Î±×·¡¹Ö¿¡ Àû¿ëÇØ º¸µµ·Ï ÇϰڴÙ. ¿ì¼± µÎ°¡Áö ÆÄ·¹Æ®ÀÇ Â÷À̰ªÀ» ±¸ÇÏ´Â ÇÔ¼ö¸¦ ¸¸µé¾î º¸µµ·Ï ÇϰڴÙ. Â÷ÀÌ´Â ´ÙÀ½°ú °°ÀÌ ±¸ÇÑ´Ù°í Çß¾ú´Ù.

diff = abs(Red-Red2) + abs(Green-Green2) + abs(Blue-Blue2);

±×·±µ¥ º¸Åë ÆÄ·¹Æ®¸¦ ÀúÀåÇÑ ¹è¿­¿¡¼­ R, G, B ´Â °¢°¢ ÇÑ ¹ÙÀÌÆ®¾¿ ¼øÂ÷ÀûÀ¸·Î ÀúÀåµÈ´Ù. ±×·³ ÇÔ¼ö¸¦ ¸¸µé¾î º¸°Ú´Ù.

unsigned PalDiffer(unsigned char *P1,unsigned char *P2)

{

return abs(*(P1+0)-*(P2+0))+ \ /* abs(Red1-Red2)+ */

abs(*(P1+1)-*(P2+1))+ \ /* abs(Green1-Green2)+ */

abs(*(P1+2)-*(P2+2)); /* abs(Blue1-Blue2)+ */

}

¿©±â¼­ P1,P2 ´Â Red, Green, Blue ¼øÀ¸·Î ÆÄ·¹Æ® °ªÀÌ ÀúÀåµÈ ¹è¿­ÀÌ´Ù. ´ÙÀ½À¸·Î ÇÒ ÀÏÀº ÇöÀç ¼³Á¤µÇ¾îÀÖ´Â ÆÄ·¹Æ®¸¦ °¡Áö°í ±×¸± PCX È­ÀÏÀÇ ÆÄ·¹Æ®¿Í °¡Àå ºñ½ÁÇÑ ÆÄ·¹Æ®¸¦ ã¾Æ³»´Â ÀÏÀÌ´Ù. ±×¸®°í ±× ÆÄ·¹Æ®ÀÇ ¹øÈ£¸¸ ³Ñ°ÜÁÖ¸é ½ÇÁ¦ ±×·ÁÁÙ¶§´Â ±× ÆÄ·¹Æ® ¹øÈ£¸¦ ÂüÁ¶ÇÏ¿© ±× »öÀ¸·Î ±×·ÁÁÖ¸é ³¡ÀÌ´Ù.

void FixPalette256(unsigned char *pal,unsigned char *num)

/* pal : ±×¸± PCX ÀÇ ÆÄ·¹Æ® */

/* num : ³Ñ°Ü¹ÞÀ» »ö»ó À妽º */

{

int i,j;

unsigned dif; /* ÇöÀç ºñ±³µÇ´Â »ö°úÀÇ Â÷À̰¡ µé¾î°£´Ù. */

unsigned min; /* ÇöÀç±îÁöÀÇ ÃÖ¼Ò Â÷À̰ªÀÌ µé¾î°£´Ù. */

unsigned char minn; /* ÃÖ¼ÒÂ÷À̸¦ °¡Áö´Â »öÀÇ ¹øÈ£°¡ µé¾î°£´Ù. */

unsigned char *PalNow=(unsigned char *)malloc(256*3);

gr_agpal256(PalNow); /* ÇöÀçÀÇ 256 Palette ¸¦ ¾ò´Â´Ù */

for(i=0;i<256;i++) {

min=60000;

for(j=0;j<256;j++) {

d8if=PalDiffer((pal+i*3),( alNow+j*3));

/* »öÀÇ Â÷À̸¦ ±¸Çؼ­ */

if(dif<min) { /* ÃÖ¼Ò°ªº¸´Ù ÀÛÀ¸¸é */

min=dif; /* ÇöÀç Â÷À̸¦ ÃÖ¼Ò°ªÀ¸·Î */

minn=(unsigned char)j;

}

}

num[i]=minn;

}

Free(PalNow);

}

PCX ¿¡¼­ Palette Á¤º¸¸¦ »©³½µÚ ÀÌ ÇÔ¼ö¸¦ ºÎ¸£°í ³Ñ°Ü¹ÞÀº À妽º¸¦ ÀÌ¿ëÇØ¼­ Á¡À» ÂïÀ¸¸é µÈ´Ù.

SetPixel(X,Y,Index[buf[i]]);

ÀÌ·±½ÄÀ¸·Î¡¦ Index ´Â ³Ñ°Ü¹ÞÀº ¹è¿­À̰í, buf ´Â ¿ø·¡ PCX ¿¡ ´ã°ÜÀÖ´ø »ö»ó °ªÀÌ´Ù.




3. GIF(Graphic Interchange Format)

¹Ì±¹ÀÇ ´ëÇ¥ÀûÀÎ BBS ¿î¿µÈ¸»çÀÎ ÄÄÇ»¼­ºê »ç¿¡¼­ ºñÆ®¸Ê À̹ÌÁö Àü¼ÛÀ» À§ÇÑ Æ÷¸ËÀ¸·Î Á¦¾ÈÇÏ¿´´Ù. °¡Àå ¶Ù¾î³­ ¾ÐÃà·üÀ²À» ÀÚ¶ûÇϸç PC´Â ¹°·Ð À¯´Ð½º ±â¹ÝÀÇ ¿öÅ©½ºÅ×À̼ǿ¡¼­ ¿î¿µÇÒ ¼ö ÀÖ´Ù. µ¥ÀÌŸ ¾ÐÃàÀ» ¸ñÇ¥·Î ¸¸µç Æ÷¸ËÀ̱⠶§¹®¿¡ ÆÄÀÏÀÇ ÃÖ´ë Å©±â´Â 64K ¡¿ 64K Çȼ¿¿¡ 256 Ä÷¯¸¸À» Ç¥ÇöÇÑ´Ù. .GIF¸¦ ±âº»À¸·Î ÇÏ´Â ¾ÖÇø®ÄÉÀ̼ÇÀº ¸¹Áö ¾ÊÀ¸³ª Á¡Â÷ º¸ÆíÈ­µÇ´Â Ãß¼¼ÀÌ´Ù. ¾Æ·¡´Â ÇÏÀÌÅÚÀÇ µÎ·ç¹° µ¿È£È¸¿¡ ÀÖ´Â GIF View ¼Ò½ºÀÌ´Ù.

/*

vgif.c (gif_)

gif control library ...

(Take up GIF_LIB.LIB written by Gershon Elder)

Written by Kim Tae-Seong

*/

#define __TEST_

#ifdef __MSDOS__

#include <stdlib.h>

#include <alloc.h>

#endif /* __MSDOS__ */

#include <stdio.h>

#include <ctype.h>

#include <string.h>

#include "gif_lib.h"

#define PROGRAM_NAME "vGif"

#define FLIP_NONE 0

#define FLIP_RIGHT 1

#define FLIP_LEFT 2

#define FLIP_HORIZ 3

#define FLIP_VERT 4

#ifdef __MSDOS__

extern unsigned int

_stklen = 16384; /* Increase default stack size. */

#endif /* __MSDOS__ */

/* Make some variables global, so we could access them faster: */

static int

ImageNum = 0;

static int LoadImage(GifFileType *GifFile, GifRowType **ImageBuffer);

static int DumpImage(GifFileType *GifFile, GifRowType *ImageBuffer,

int Width, int Height, int FlipDirection);

static void QuitGifError(GifFileType *GifFileIn, GifFileType *GifFileOut);

#ifdef __TEST

void main(int argc, char **argv)

{

int i, Error, NumFiles, ExtCode, FlipDirection = FLIP_RIGHT,

RightFlag = FALSE, LeftFlag = FALSE,

HorizFlag = FALSE, VertFlag = FALSE, HelpFlag = FALSE;

GifRecordType RecordType;

GifByteType *Extension;

char **FileName = NULL;

GifRowType *ImageBuffer;

GifFileType *GifFileIn = NULL, *GifFileOut = NULL;

if (argc < 2) {

printf("vgif giffile[.gif]\n");

return;

}

if (strchr(argv[1], '.') == NULL)

strcat(argv[1], ".gif");

*FileName = argv[1];

i = 0;

if (i == 0)

FlipDirection = FLIP_NONE;

if ((GifFileIn = DGifOpenFileName(*FileName)) == NULL)

QuitGifError(GifFileIn, GifFileOut);

/* Open stdout for the output file: */

if ((GifFileOut = EGifOpenFileHandle(1)) == NULL)

QuitGifError(GifFileIn, GifFileOut);

/* Dump out exactly same screen information: */

if (EGifPutScreenDesc(GifFileOut,

GifFileIn -> SWidth, GifFileIn -> SHeight,

GifFileIn -> SColorResolution, GifFileIn -> SBackGroundColor,

GifFileIn -> SBitsPerPixel, GifFileIn -> SColorMap) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

/* Scan the content of the GIF file and load the image(s) in: */

do {

if (DGifGetRecordType(GifFileIn, &RecordType) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

switch (RecordType) {

case IMAGE_DESC_RECORD_TYPE:

if (DGifGetImageDesc(GifFileIn) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

if (GifFileIn -> IInterlace)

GIF_EXIT("Cannt flip interlaced images - use GifInter first.");

/* Put the image descriptor to out file: */

/* No rotation - only flipping vert. or horiz.: */

if (EGifPutImageDesc(GifFileOut,

GifFileIn -> ILeft, GifFileIn -> ITop,

GifFileIn -> IWidth, GifFileIn -> IHeight,

FALSE, GifFileIn -> IBitsPerPixel,

GifFileIn -> IColorMap) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

/* Load the image (either Interlaced or not), and dump it */

/* fliped as requrested by Flags: */

if (LoadImage(GifFileIn, &ImageBuffer) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

if (DumpImage(GifFileOut, ImageBuffer, GifFileIn -> IWidth,

GifFileIn -> IHeight, FlipDirection) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

break;

case EXTENSION_RECORD_TYPE:

/* Skip any extension blocks in file: */

if (DGifGetExtension(GifFileIn, &ExtCode, &Extension) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

if (EGifPutExtension(GifFileOut, ExtCode, Extension[0],

Extension) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

/* No support to more than one extension blocks, so discard: */

while (Extension != NULL) {

if (DGifGetExtensionNext(GifFileIn, &Extension) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

}

break;

case TERMINATE_RECORD_TYPE:

break;

default: /* Should be traps by DGifGetRecordType. */

break;

}

}

while (RecordType != TERMINATE_RECORD_TYPE);

if (DGifCloseFile(GifFileIn) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

if (EGifCloseFile(GifFileOut) == GIF_ERROR)

QuitGifError(GifFileIn, GifFileOut);

}

#endif

/******************************************************************************

* Routine to read Image out. The image can be Non interlaced only. *

* The memory required to hold the image is allocate by the routine itself. *

* Return GIF_OK if succesful, GIF_ERROR otherwise. *

******************************************************************************/

static int LoadImage(GifFileType *GifFile, GifRowType **ImageBufferPtr)

{

int Size, i;

GifRowType *ImageBuffer;

/* Allocate the image as vector of column of rows. We cannt allocate */

/* the all screen at once, as this broken minded CPU can allocate up to */

/* 64k at a time and our image can be bigger than that: */

if ((ImageBuffer = (GifRowType *)

malloc(GifFile -> IHeight * sizeof(GifRowType *))) == NULL)

GIF_EXIT("Failed to allocate memory required, aborted.");

Size = GifFile -> IWidth * sizeof(GifPixelType);/* One row size in bytes.*/

for (i = 0; i < GifFile -> IHeight; i++) {

/* Allocate the rows: */

if ((ImageBuffer[i] = (GifRowType) malloc(Size)) == NULL)

GIF_EXIT("Failed to allocate memory required, aborted.");

}

*ImageBufferPtr = ImageBuffer;

GifQprintf("\n%s: Image %d at (%d, %d) [%dx%d]: ",

PROGRAM_NAME, ++ImageNum, GifFile -> ILeft, GifFile -> ITop,

GifFile -> IWidth, GifFile -> IHeight);

for (i = 0; i < GifFile -> IHeight; i++) {

GifQprintf("\b\b\b\b%-4d", i);

if (DGifGetLine(GifFile, ImageBuffer[i], GifFile -> IWidth)

== GIF_ERROR) return GIF_ERROR;

}

return GIF_OK;

}

/******************************************************************************

* Routine to dump image out. The given Image buffer should always hold the *

* image sequencially, and Width & Height hold image dimensions BEFORE flip. *

* Image will be dumped according to FlipDirection. *

* Once dumped, the memory holding the image is freed. *

* Return GIF_OK if succesful, GIF_ERROR otherwise. *

******************************************************************************/

static int DumpImage(GifFileType *GifFile, GifRowType *ImageBuffer,

int Width, int Height, int FlipDirection)

{

int i, j, Count;

GifRowType Line; /* New scan line is copied to it. */

/* Allocate scan line that will fit both image width and height: */

if ((Line = (GifRowType) malloc((Width > Height ? Width : Height)

* sizeof(GifPixelType))) == NULL)

GIF_EXIT("Failed to allocate memory required, aborted.");

switch (FlipDirection) {

case FLIP_RIGHT:

for (Count = Width, i = 0; i < Width; i++) {

GifQprintf("\b\b\b\b%-4d", Count--);

for (j = 0; j < Height; j++)

Line[j] = ImageBuffer[Height - j - 1][i];

if (EGifPutLine(GifFile, Line, Height) == GIF_ERROR)

return GIF_ERROR;

}

break;

case FLIP_LEFT:

for (i = Width - 1; i >= 0; i--) {

GifQprintf("\b\b\b\b%-4d", i + 1);

for (j = 0; j < Height; j++)

Line[j] = ImageBuffer[j][i];

if (EGifPutLine(GifFile, Line, Height) == GIF_ERROR)

return GIF_ERROR;

}

break;

case FLIP_HORIZ:

for (i = Height - 1; i >= 0; i--) {

GifQprintf("\b\b\b\b%-4d", i);

if (EGifPutLine(GifFile, ImageBuffer[i], Width) == GIF_ERROR)

return GIF_ERROR;

}

break;

case FLIP_VERT:

for (Count = Height, i = 0; i < Height; i++) {

GifQprintf("\b\b\b\b%-4d", Count--);

for (j = 0; j < Width; j++)

Line[j] = ImageBuffer[i][Width - j - 1];

if (EGifPutLine(GifFile, Line, Width) == GIF_ERROR)

return GIF_ERROR;

}

break;

default :

for (i = 0; i < Height; i++) {

GifQprintf("\b\b\b\b%-4d", i);

if (EGifPutLine(GifFile, ImageBuffer[i], Width) == GIF_ERROR)

return GIF_ERROR;

}

break;

}

/* Free the memory used for this image, and the temporary scan line: */

for (i = 0; i < Height; i++) free((char *) ImageBuffer[i]);

free((char *) ImageBuffer);

free((char *) Line);

return GIF_OK;

}

/******************************************************************************

* Close both input and output file (if open), and exit. *

******************************************************************************/

static void QuitGifError(GifFileType *GifFileIn, GifFileType *GifFileOut)

{

PrintGifError();

if (GifFileIn != NULL) DGifCloseFile(GifFileIn);

if (GifFileOut != NULL) EGifCloseFile(GifFileOut);

exit(1);

}




4. ILBM

Amiga±âÁ¾ÀÇ Deluxe Paint¿¡¼­ ½ÃÀÛµÈ Æ÷¸ËÀ¸·Î ½ºÆ÷Ã÷ °ÔÀÓÀ¸·Î À¯¸íÇÑ Electronic Arts »ç°¡ PC¿ëÀ¸·Î ÄÁ¹öÁ¯ÇÑ µð·°½º ÆäÀÎÆ®¿¡¼­µµ ±âº»ÀûÀÎ Æ÷¸ËÀ¸·Î »ç¿ëµÈ´Ù.(À̹ÌÁö È®ÀåÀÚ´Â LBM,ºÎºÐ À̹ÌÁö ȤÀåÀÚ´Â BBM) ±×·¯³ª Amiga¿¡¼­ ¾²´Â ILBMÆ÷¸Ë ÀÚüÀÇ Çü½ÄÀÌ ¿©·¯°¡Áö°¡ µÇ¾î µð·°½º ÆäÀÎÆ®¿¡¼­µµ ¸ø Àд °æ¿ì°¡ ¸¹´Ù. ¾Æ·¡´Â ILBM View ¼Ò½ºÀÌ´Ù.

/*-------------------------------------------------------------------------*/

/* ILBM320 by Mark E. Kern. The following source code may be used, */

/* modified, copied and shared with no obligation to the author */

/* whatsoever, as long as this notice accompanies the source. */

/* Please direct any questions to GEnie:MKERN1 or CS:70670,3120. */

/* Code written in Borland C++ in ANSI C mode. Sept 9,1991 */

/* ------------------------------------------------------------------------*/

#include <stdio.h>

#include <graphics.h>

#include <conio.h>

#include <stdlib.h>

#include <string.h>

#include <dos.h>

/* This defines the key information header contained in the ILBM format */

struct headform{

long flen;

char msg2[8];

long hlen;

int width;

int length;

int xoff;

int yoff;

char planes;

char masking;

char compression;

char padbyte;

int transparent;

char x_aspect;

char y_aspect;

int screenWidth;

int screenHeight;

};

/* Structure used to store RGB values as they are read from the file */

struct RGBColor {

char red;

char green;

char blue;

};

int InitGraphics(void);

void CheckError(void);

int huge detectVGA(void);

int ReadHeader(FILE *picFile, struct headform *header);

int ReadCMap(FILE *picFile, struct headform *header);

int DumpToScreen(FILE *picFile, struct headform *header);

void drawline(int *yoffset,unsigned char Vbuff[324],int *scanline);

void Quit(int errCode);

long ReverseLong(long num);

int ReverseWord(int num);

int expo(int x,int y);

void setDAC(struct RGBColor pallete[256]);

/* expo calculates x^y and returns it as an integer value. */

int expo(int x,int y){

int answer=x;

while(y > 1){

answer = answer * x;

--y;

}

return(answer);

}

/* This code reverses the byte order in the long values read in from the

file. This is to satisfy Intel's byte ordering scheme. */

long ReverseLong(long num){

long actualnum;

actualnum = ((num >> 24) & 0x000000ff) |

((num >> 8) & 0x0000ff00) |

((num << 8) & 0x00ff0000) |

((num << 24) & 0xff000000);

return(actualnum);

}

/* This code reverses the byte order in the word values read in from the

file. This is to satisfy Intel's byte ordering scheme. */

int ReverseWord(int num){

int actualnum;

actualnum = ((num >> 8) & 0x00ff) |

((num << 8) & 0xff00);

return(actualnum);

}

/* main asks for the ILBM file to diplay, opens the file, and then proceeds

to: 1)Init the graphics.

2)Read in the major header information.

3)Read in the color map and set the DAC registers.

4)Dump the image line by line from the file to the screen.

5)Wait for a keypress before closing up the file and shutting down. */

main(){

FILE *picFile;

char filename[12];

struct headform header;

printf("LBM file to display: ");

scanf("%s",&filename);

printf("Now reading: %s\n",filename);

picFile = fopen(filename,"rb");

if(picFile == NULL) {

printf("could not open file: %s\n",filename);

exit(1);

}

InitGraphics();

ReadHeader(picFile,&header);

ReadCMap(picFile,&header);

DumpToScreen(picFile,&header);

getch();

closegraph();

fclose(picFile);

}

/* Standard Borland code to initialize the graphics mode using the Borland

VGA256 BGI driver. */

int InitGraphics(void){

int gdriver, gmode;

gdriver = installuserdriver("VGA256", detectVGA);

gdriver = DETECT;

CheckError();

initgraph(&gdriver, &gmode, "");

CheckError();

return(0);

}

/* Routine that checks for the existence of a VGA card on the host computer.

The pointer to this routine is passed to the installuserdriver call in

the InitGraphics function. */

int huge detectVGA(void){

int detectedDriver;

int suggestedMode;

detectgraph(&detectedDriver,&suggestedMode);

if((detectedDriver = VGA) || (detectedDriver = MCGA))

return(0);

else

return(grError);

}

/* This routine is called after any major BGI graphics call to check it

for errors that may have occured. */

void CheckError(void){

int errorcode;

errorcode = graphresult();

if (errorcode != grOk) /* an error occurred */

{

printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1); /* return with error code */

}

}

/* ReadHeader takes a file pointer and starts to read in values into the

header structure previously defined. It first checks to see if the

file is an ILBM file by looking for the word "FORM", which should be

in the beginning of the file. */

int ReadHeader(FILE *picFile, struct headform *header){

int err;

char form[5];

fread(form,4,1,picFile);

form[4]='\0';

if(strcmp("FORM",form) != 0){

printf("This is not an ILBM file.\n");

printf("%s detected instead.\n",form);

Quit(1);

}

fread(&header->flen,sizeof(header->flen),1,picFile);

fread(&header->msg2,8,1,picFile);

fread(&header->hlen,4,1,picFile);

fread(&header->width,sizeof(header->width),1,picFile);

fread(&header->length,sizeof(header->length),1,picFile);

fread(&header->xoff,sizeof(header->xoff),1,picFile);

fread(&header->yoff,sizeof(header->yoff),1,picFile);

fread(&header->planes,sizeof(header->planes),1,picFile);

fread(&header->masking,sizeof(header->masking),1,picFile);

fread(&header->compression,sizeof(header->compression),1,picFile);

fread(&header->padbyte,sizeof(header->padbyte),1,picFile);

fread(&header->transparent,sizeof(header->transparent),1,picFile);

fread(&header->x_aspect,sizeof(header->x_aspect),1,picFile);

fread(&header->y_aspect,sizeof(header->y_aspect),1,picFile);

fread(&header->screenWidth,sizeof(header->screenWidth),1,picFile);

fread(&header->screenHeight,sizeof(header->screenHeight),1,picFile);

/* Finished loading in the header, now reverse the values to make

them Intel compatible. */

header->flen = ReverseLong(header->flen);

header->hlen = ReverseLong(header->hlen);

header->width = ReverseWord(header->width);

header->length = ReverseWord(header->length);

header->xoff = ReverseWord(header->xoff);

header->yoff = ReverseWord(header->yoff);

header->transparent = ReverseWord(header->transparent);

header->screenWidth = ReverseWord(header->screenWidth);

header->screenHeight = ReverseWord(header->screenHeight);

return(0);

}

/* ReadCMap first looks for the CMAP text in the file which denotes the

beginning of the color information. Once it finds the CMAP header, it

checks to see if the number of colors(x 3 for numbytes) matches the

length of the CMAP, which is read in after the header. If everything

is ok, it then loads up the array pallete with the rgb values contained

in the CMAP section of the file. ReadCMap then calls setDAC to load

the video DAC registers with the appropriate values. */

int ReadCMap(FILE *picFile, struct headform *header){

char form[5];

long CMAPsize;

struct palettetype pal;

unsigned char rgbTuple[3];

int x;

int numColors;

struct RGBColor pallete[256];

fread(form,4,1,picFile);

form[4]='\0';

if(strcmp("CMAP",form) != 0){

printf("Could not find the color map.\n");

printf("%s found instead.\n",form);

Quit(1);

}

fread(&CMAPsize,sizeof(CMAPsize),1,picFile);

CMAPsize=ReverseLong(CMAPsize);

numColors=expo(2,header->planes);

if(CMAPsize != (numColors*3)){

printf("CMAP size is invalid.\n");

Quit(1);

}

for(x=0;x<numColors;++x){

fread(rgbTuple,3,1,picFile);

pallete[x].red = rgbTuple[0]>>2;

pallete[x].green = rgbTuple[1]>>2;

pallete[x].blue = rgbTuple[2]>>2;

}

setDAC(pallete);

return(0);

}

/* setDAC uses some pretty sophisticated funtions of Borland C. We first

set up a bunch of variables to hold CPU register values in type REGS.

Once we have done this, we can make some low level calls to the video

BIOS to set up the colors we want in the picture. We enter a loop that

sets each register to a RGB color combination and calls the BIOS routine

to set the specific DAC register we are interesed in. */

void setDAC(struct RGBColor pallete[256])

{

union REGS regs;

int i;

printf("Setting up RGB color values.\nplease wait.\n");

/* This sets up each of the 16 pallete entries to enable the proper

DAC register when the pallete value is combined with the pixel

value. */

for(i=0;i<16;++i){

regs.h.ah = 0x10;

regs.h.al = 0x00;

regs.h.bh = i;

regs.h.bl = i;

int86(0x10,&regs,&regs);

}

regs.h.bl = 0x00;

for (i=0;i<256;++i){

regs.h.ah = 0x10; /* set specific DAC rgb register value */

regs.h.al = 0x10; /* subfunction number, set register */

regs.h.ch = pallete[i].green; /* CH contains the green value */

regs.h.cl = pallete[i].blue; /* CL contains the blue value */

regs.h.dh = pallete[i].red; /* DH contains the red value */

int86(0x10, &regs, &regs); /* int 10h */

++regs.h.bl;

}

}

/* DumpToScreen unpacks the graphics information contained in the file. It

first searches for the BODY header which precedes the actual graphics

data. If we don't find the BODY header, the program will just crash, since

I don't look out for the end of the file here. Once it finds the header,

it reads in the next value, which is the length of the body. We use this

value to read in the the next n number of bytes as specified by the body

length. ILBM seems to use a run length encoding scheme to pack the data.

The function looks at the first byte read. If the first byte read in is

between -1 and -127, then this means we are to read in the next byte

value, and repeat this value 1 to 127 times depending on the first byte

value we read. I.E. if the first value we read was -1, we read the next

value and repeat this value in the scanline 2 times (1-(-1)). If the

header value was -128, we would do nothing, as this is the no-operation

code. If the header value, call this n,is between 0 and 128, we interpret

this to mean the next n bytes are to be read in normally and stuffed

into the scanline without any sort of expansion or processing. Once this

function has read enough bytes to make up a scanline (320 bytes in VGA

mode 13h), we call a routine that dumps the scanline we just built to

the screen. We keep doing this until we run out of bytes to read. Note

that it is possible for an image to have more than 200 scanlines of data,

but our scanline dump routine ignores lines past 200. */

int DumpToScreen(FILE *picFile, struct headform *header){

int yoffset=0; /* the y coord of the scanline */

int index=0; /* index into the scanline array */

int pixelsToGo=0; /* number of pixels to go to form a line*/

int i; /* loop counter */

unsigned char Vbuff[324]; /* buffer to hold the scanline. It

is 4 bytes longer than the regular

length so it can hold hsize and

vsize data for the putimage call */

int repeat; /* how many times to repeat the byte*/

char repeatValue; /* raw byte value from file */

char bufValue; /* raw buffer value read from file*/

long size; /* size of the BODY segment */

long bytesToGo; /* bytes to go till end of BODY */

char form[5]; /* holds header */

fread(form,4,1,picFile);

form[4]='\0';

while(strcmp("BODY",form) != 0){ /* find the BODY */

form[0]=form[1];

form[1]=form[2];

form[2]=form[3];

form[3]=fgetc(picFile);

}

fread(&size,sizeof(size),1,picFile);

bytesToGo = ReverseLong(size);

Vbuff[0]=(320-1) & 0xff; /* set up height and width of

our scanline. Since we use

putimage to dump our scanline,

we have to tell it how big

the 'shape' we are drawing

to the screen is. In our case

the shape is 320x1 in size.*/

Vbuff[1]=(320-1) >> 8;

Vbuff[2]=1;

Vbuff[3]=0;

index = index+4; /* update the index into the scanline */

/* Check to see if the compression is of the proper type, which in

our case is 1. If it is uncompressed, or if we don't know the

compression type, we exit the program. */

if(header->compression != 1){

printf("Cannot handle this compression type.\n");

return(1);

}

while(bytesToGo > 0)

{

fread(&repeatValue,1,1,picFile);

if(ferror(picFile))

{

printf("Error in repeat value read.\n");

return(1);

}

--bytesToGo;

repeat = repeatValue;

if (repeat == -128);

else if((repeat <= -1) && (repeat >= -127))

{

fread(&bufValue,1,1,picFile);

if(ferror(picFile))

{

printf("Error in pixel value read.\n");

return(1);

}

--bytesToGo;

for (i=0;i<(1-repeat);++i)

{

Vbuff[pixelsToGo+4] = bufValue;

++pixelsToGo;

if(pixelsToGo == 320)

drawline(&yoffset,Vbuff,&pixelsToGo);

}

}

else if((repeat >= 0) && (repeat <= 127))

{

for(i=0;i<=repeat;++i)

{

fread(&(Vbuff[pixelsToGo+4]),1,1,picFile);

if(ferror(picFile))

{

printf("Error in pixel value read.\n");

return(1);

}

--bytesToGo;

++pixelsToGo;

if(pixelsToGo == 320)

drawline(&yoffset,Vbuff,&pixelsToGo);

}

} /*end if*/

}/*end while bodysize*/

return(0);

}

/* drawline takes an array containing the scanline data we have just

read in, and dumps it to the screen using the putimage call in the

Borland BGI. The function then increments the yvalue to point to

the next scanline, then resets the pixels to go value (scanline) to

0 again. If we are currently working on a scanline greater than can

fit on the screen (i.e. greater than 200), we just ignore it and don't

draw it to the screen. */

void drawline(int *yoffset,unsigned char Vbuff[324],int *scanline){

if(*yoffset <= 200)

putimage(0,*yoffset,Vbuff,COPY_PUT);

++*yoffset;

*scanline=0;

}

void Quit(int errCode){

printf("%d",errCode);

closegraph();

}




5. BMP(Microsoft Windows Device Independent Bitmap)

¸¶ÀÌÅ©·Î ¼ÒÇÁÆ® À©µµ¿ìÁî¿¡¼­ ±âº»À¸·Î Áö¿øÇϰí ÀÖ´Â ÆÄÀÏ Æ÷¸ËÀÌ´Ù. ¿î¿µÃ¼Á¦¿¡¼­ Áö¿ì³ÊÀ» Çϰí Àֱ⠶§¹®¿¡ À©µµ¿ìÁî¿ë ¾ÖÇø®ÄÉÀ̼ÇÀ̶ó¸é °ÅÀÇ ´ëºÎºÐ ÀÌ Æ÷¸ËÀ» Áö¿øÇϰí ÀÖ´Ù. 1ºñÆ®ºÎÅÍ 8ºñÆ® Ä÷¯±îÁö´Â Ä÷¯ ¸ÊÀ» °®°í »ö»óÀ» Ç¥ÇöÇÏÁö¸¸ 24ºñÆ® À̹ÌÁö´Â ºñµð¿À ·¥¿¡¼­ Á÷Á¢ Ç¥ÇöÇÑ´Ù. Âü°í·Î OS/2 2.0 ¿¡´Â OS/2 WinÀÌ ³»ÀåµÇ¾î Àֱ⠶§¹®¿¡ OS/2 ¿¡¼­µµ »ç¿ëÇÒ ¼ö ÀÖ´Ù.¾Æ·¡´Â BMP View ¼Ò½ºÀÌ´Ù.

/*

* File Name: BMP.C

*

* BMP formatÀÇ image fileÀ» loading ÇÏ¿© screen¿¡ display.

*

* Memory Model: Large

*

* Notes:

* - mono ¹× 16 color, 256 color´Â °¢°¢ display mode 11H, 13H, 13H¸¦

* ¾¸. 'C'·Î codingÇÏ´Â °ü°è»ó 16 color, 256 color display mode´Â

* °íÇØ»óµµ mode°¡ ¼Óµµ¹®Á¦¿¡ °É¸². ¶ÇÇÑ page segment set °è»êÀÌ

* ±ÍÂúÀº ¹®Á¦ÀÓ.

*

* Created by Sohn Dongik, 1992, 11

*/

#include <stdio.h>

#include <alloc.h>

#include <dos.h>

#define MONO_640_480 0x0011

#define COLOR16_640_480 0x0012

#define COLOR256_320_200 0x0013

#define COLOR256_640_480 0x002e

#define SUCCESS 0

#define ERR_READ 1

#define ERR_INV_COMPRESSION 2

#define MAX_LINES 4096

#define ESC 0x1b

#define HOME 0x47

#define END 0x4f

#define UP 0x48

#define DOWN 0x50

#define LEFT 0x4b

#define RIGHT 0x4d

typedef unsigned int UINT;

typedef int WORD;

typedef long DWORD;

typedef long LONG;

/*

* BMP fileÀÇ Ã¹ ºÎºÐÀÇ header structure.

*/

typedef struct tagBITMAPFILEHEADER

{

UINT bfType; /* BMP File Type(Ç×»ó 'BM') */

DWORD bfSize; /* BMP File Size */

UINT bfReserved1; /* Reserved(Ç×»ó '0') */

UINT bfReserved2; /* Reserved(Ç×»ó '0') */

DWORD bfOffBits; /* ½ÇÁ¦ BMP image data offset */

} BITMAPFILEHEADER;

/*

* BMP fileÀÇ format information header structure.

*/

typedef struct tagBITMAPINFOHEADER

{

DWORD biSize; /* structure size */

LONG biWidth; /* image °¡·Î size(dot ´ÜÀ§) */

LONG biHeight; /* image ¼¼·Î size(dot ´ÜÀ§) */

WORD biPlanes; /* screen Æò¸é ¼ö */

WORD biBitCount; /* ÇÑ pixel´ç bit ¼ö */

DWORD biCompression; /* image data ¾ÐÃà ¹æ½Ä */

DWORD biSizeImage; /* ¾ÐÃà ¾ÈµÈ image data size */

LONG biXPelsPerMeter; /* target deviceÀÇ X ÇØ»óµµ */

LONG biYPelsPerMeter; /* target deviceÀÇ Y ÇØ»óµµ */

DWORD biClrUsed; /* color index number */

DWORD biClrImportant; /* color important color */

} BITMAPINFOHEADER;

#define BI_RGB 0L

/*

* #define BI_RLE8

* #define BI_RLE4

*

* Run Length Encoding ¹æ½ÄÀº Áö¿ø ÇÏÁö ¾ÊÀ½.

*/

void SetMode(int);

void SetVGAPalette(char *, int);

void PanImage(void);

void DisplayImage(int, int);

BITMAPFILEHEADER bmf;

BITMAPINFOHEADER bmi;

unsigned int ScreenWidth; /* ÇöÀç display modeÀÇ X size */

unsigned int ScreenHeight; /* ÇöÀç display modeÀÇ Y size */

unsigned int BytesPerLine; /* imageÀÇ ÇÑ line´ç byte ¼ö */

unsigned int xMove; /* image À̵¿ Æø(byte ´ÜÀ§) */

char far *ImageBuffer[MAX_LINES];

main(int argc, char *argv[])

{

FILE *fp;

int i, j, bmfSize, bmiSize, mode;

char Palette[1024];

if(argc != 2) /* arg check */

{

puts("Usage: bmpinfo bmp_file_name");

exit(1);

}

if((fp = fopen(argv[1], "rb")) == NULL) /* file open */

{

printf("can't open file %s!", argv[1]);

exit(1);

}

/*

* BMP file header read.

*/

bmfSize = sizeof(BITMAPFILEHEADER);

if(fread(&bmf, 1, bmfSize, fp) != bmfSize)

{

puts("Error reading BMP file header!");

fclose(fp);

exit(1);

}

/*

* BMP info header read.

*/

bmiSize = sizeof(BITMAPINFOHEADER);

if(fread(&bmi, 1, bmiSize, fp) != bmiSize)

{

puts("Error reading BMP file headef!");

fclose(fp);

exit(1);

}

/*

* pixel´ç bit ¼ö¿¡ µû¸¥ display mode¹× screen ÇØ»óµµ °áÁ¤.

*/

switch(bmi.biBitCount)

{

case 1:

BytesPerLine = bmi.biWidth / 8;

if(BytesPerLine % 8) BytesPerLine++;

mode = MONO_640_480; /* display mode */

ScreenWidth = 80; /* in bytes */

ScreenHeight = 480; /* screen depth */

xMove = 3; /* 24 dots */

break;

case 4:

BytesPerLine = bmi.biWidth;

/*

* 16 color palette read.

*/

if(fread(Palette, 1, 64, fp) != 64)

{

fclose(fp);

puts("Error in reading palette!");

exit(1);

}

mode = COLOR256_320_200; /* display mode */

ScreenWidth = 320; /* */

ScreenHeight = 200;

xMove = 24;

break;

case 8:

if(bmi.biWidth % 4) BytesPerLine = ((bmi.biWidth / 4) + 1) * 4;

else BytesPerLine = bmi.biWidth;

if(fread(Palette, 1, 1024, fp) != 1024)

{

fclose(fp);

puts("Error in reading palette!");

exit(1);

}

mode = COLOR256_320_200;

ScreenWidth = 320;

ScreenHeight = 200;

xMove = 24;

break;

default:

fclose(fp);

puts("Not supported colors !");

exit(1);

}

/*

* line image buffer memory allocation.

*/

for(i = 0; i < bmi.biHeight; i++)

{

if((ImageBuffer[i] = farmalloc(BytesPerLine + 128)) == NULL)

{

for(j = i - 1; j >= 0; j--) farfree(ImageBuffer[j]);

fclose(fp);

puts("Memory Allocation Error !");

exit(1);

}

memset(ImageBuffer[i], 0x00, BytesPerLine + 128);

}

/*

* BMP image read.

*/

if(UnpackBMPImage(fp))

{

for(i = 0; i < bmi.biHeight; i++) farfree(ImageBuffer[i]);

putch(7);

exit(1);

}

fclose(fp);

SetMode(mode);

/*

* color palette set.

*/

if(bmi.biBitCount != 1) SetVGAPalette(Palette, 256);

PanImage(); /* image scroll ¹× pan */

for(i = 0; i < bmi.biHeight; i++) farfree(ImageBuffer[i]);

SetMode(0x03);

}

/*

* BMP image read function

*/

UnpackBMPImage(FILE *fp)

{

int i, j, c;

if(bmi.biCompression == BI_RGB) /* ¾ÐÃàµÇÁö ¾ÊÀº °æ¿ì */

{

/*

* 16 colorÀÇ °æ¿ì(256 color image data·Î º¯È¯).

*/

if(bmi.biBitCount == 4) {

for(i = 1; i <= bmi.biHeight; i++)

{

fseek(fp, (long)-i * (long)BytesPerLine / 2L, SEEK_END);

for(j = 0; j < bmi.biWidth / 2; j++)

{

c = fgetc(fp) & 0xff;

ImageBuffer[i - 1][j * 2] = (char)(c >> 4);

ImageBuffer[i - 1][(j * 2) + 1] = (char)(c & 0x0f);

}

}

}

/*

* mono ¹× 256 color image data read.

*/

else

{

for(i = 1; i <= bmi.biHeight; i++)

{

fseek(fp, (long)-i * (long)BytesPerLine, SEEK_END);

if(fread(ImageBuffer[i - 1], 1, BytesPerLine, fp) !=

BytesPerLine) return ERR_READ;

}

}

}

else return ERR_INV_COMPRESSION;

return SUCCESS;

}

/*

* imageÀÇ scroll ¹× pan.

*/

void PanImage(void)

{

int c;

int xPosition = 0, yPosition = 0;

int xMax, yMax;

xMax = BytesPerLine - ScreenWidth;

yMax = bmi.biHeight - ScreenHeight;

DisplayImage(xPosition, yPosition);

while((c = getch()) != ESC)

{

if(!c)

{

switch(getch())

{

case HOME:

xPosition = yPosition = 0;

DisplayImage(xPosition, yPosition);

break;

case END:

if(BytesPerLine > ScreenWidth ||

bmi.biHeight > ScreenHeight)

{

xPosition = BytesPerLine - ScreenWidth;

if(xPosition < 0) xPosition = 0;

yPosition = bmi.biHeight - ScreenHeight;

if(yPosition < 0) yPosition = 0;

DisplayImage(xPosition, yPosition);

}

break;

case UP:

if(yPosition > 0)

{

yPosition -= 24;

if(yPosition < 0) yPosition = 0;

DisplayImage(xPosition, yPosition);

}

break;

case DOWN:

if(yPosition < yMax)

{

yPosition += 24;

DisplayImage(xPosition, yPosition);

}

break;

case LEFT:

if(xPosition > 0)

{

xPosition -= xMove;

if(xPosition < 0) xPosition = 0;

DisplayImage(xPosition, yPosition);

}

break;

case RIGHT:

if(xPosition < xMax)

{

xPosition += xMove;

DisplayImage(xPosition, yPosition);

}

default:

break;

}

}

}

}

/*

* ÇöÀç ½ÃÀÛ image pointºÎÅÍ display ¿µ¿ª¸¸Å­ image display.

*/

void DisplayImage(int xPosi, int yPosi)

{

register i, j, iSize;

unsigned jump;

for(i = yPosi, j = 0; i < yPosi + ScreenHeight; i++, j++)

{

jump = (unsigned)j * ScreenWidth;

if(i >= bmi.biHeight) memset(MK_FP(0xa000, jump), 0x00, ScreenWidth);

else

{

if((BytesPerLine - xPosi) < ScreenWidth)

iSize = BytesPerLine - xPosi;

else iSize = ScreenWidth;

movedata(FP_SEG(ImageBuffer[i] + xPosi),

FP_OFF(ImageBuffer[i] + xPosi),

0xa000, jump, iSize);

if(iSize < ScreenWidth)

memset(MK_FP(0xa000, jump + iSize), 0x00, ScreenWidth - iSize);

}

}

}

/*

* display mode set.

*/

void SetMode(int mode)

{

union REGS in, out;

in.x.ax = mode;

int86(0x10,&in,&out);

}

/*

* VGA color palette set.

*/

void SetVGAPalette(char *palette, int change)

{

union REGS in, out;

struct SREGS sreg;

register i;

char buff[768];

for(i = 0; i < change; i++)

{

buff[i * 3] = palette[(i * 4) + 2] >> 2;

buff[(i * 3) + 1] = palette[(i * 4) + 1] >> 2;

buff[(i * 3) + 2] = palette[i * 4] >> 2;

}

in.x.ax = 0x1012;

in.x.bx = 0;

in.x.cx = change;

in.x.dx = FP_OFF(buff);

sreg.es = FP_SEG(buff);

int86x(0x10, &in, &out, &sreg);

}




6. ICON

±×·¡ÇÈ ÆÄÀÏ Æ÷¸ËÀ̶ó°í Çϱâ´Â ¹®Á¦°¡ ÀÖÁö¸¸ ¸ðµÎ ´Ù ¾Æ´Â ICON ÆÄÀÏ¿¡ ´ëÇÑ ¼Ò½º¸¦ ¼Ò°³ÇϰڴÙ. µ¥¸ð¸¦ º¸¿©ÁÖ´Â ÇÁ·Î±×·¥ÀÎÁö¶ó ¾µµ¥ ¾ø´Â ·çƾÀÌ ÀÖÁö¸¸ ¼Ò½º È­ÀÏÀ» ¹Ù²Ù´Â °ÍÀº ¹®Á¦°¡ ÀÖÀ¸¹Ç·Î ±×´ë·Î ¼Ò°³Çϱâ·Î ÇϰڴÙ.

6.1 È­Àϸí : ICON.CPP

#include "icon.h"

#include <stdio.h>

Icon::Icon(char *name)

{

buffer = new char[512];

Load(name);

}

void Icon::Load(char *name)

{

bufferptr = buffer;

FILE *fpt = fopen(name,"rb");

if (fpt==NULL) return;

fseek(fpt,126,0);

for(int y = 31; y >=0; y--){

bufferptr = buffer + (y<<4);

for(int x = 0; x < 16; x++)

*bufferptr++ = (char) fgetc(fpt);

}

fclose(fpt);

}

void Icon::Draw(int x, int y)

{

bufferptr = buffer;

asm mov dx,3ceh

asm mov ax,0205h

asm out dx,ax

static char color;

int temp((y<<6) + (y<<4)); // temp = y * 80

for(int j = y; j < y+32; j++){

for(int i=x; i <x+32; i++){

color = (*bufferptr>>4)&0x0f;

asm mov bx, WORD PTR temp

asm mov dx,WORD PTR i

asm mov ax,dx

asm shr dx,1

asm shr dx,1

asm shr dx,1

asm add bl,dl

asm adc bh,0

asm and al,07h

asm mov cl,al

asm mov ah,080h

asm shr ah,cl

asm mov dx,03ceh

asm mov al,8

asm out dx,ax

asm mov ax,0a000h

asm mov es,ax

asm mov ah,BYTE PTR es:[bx]

asm mov ah,BYTE PTR color

asm mov es:[bx],ah

color = *bufferptr++ & 0x0f;

i++;

asm mov bx, WORD PTR temp

asm mov dx,WORD PTR i

asm mov ax,dx

asm shr dx,1

asm shr dx,1

asm shr dx,1

asm add bl,dl

asm adc bh,0

asm and al,07h

asm mov cl,al

asm mov ah,080h

asm shr ah,cl

asm mov dx,03ceh

asm mov al,8

asm out dx,ax

asm mov ax,0a000h

asm mov es,ax

asm mov ah,BYTE PTR es:[bx]

asm mov ah,BYTE PTR color

asm mov es:[bx],ah

}

temp += 80;

}

asm mov ax,0005h

asm out dx,ax

asm mov ax,0ff08h

asm out dx,ax

}

6.2 È­Àϸí : ICONDEMO.CPP

#include "icon.h"

main()

{

asm mov ah,0h // graphic mode(640*480)

asm mov al,12h

asm int 10h

Icon *icon0 = new Icon("peter.ico");

Icon *icon1 = new Icon("12god1.ico");

Icon *icon2 = new Icon("12god2.ico");

Icon *icon3 = new Icon("12god3.ico");

Icon *icon4 = new Icon("12god4.ico");

Icon *icon5 = new Icon("12god5.ico");

int x;

for(int y=0;y<=440;y+=32){

x=10;

for(int i=0;i <3;i++){

icon0->Draw(x,y);x+=32;

icon1->Draw(x,y);x+=32;

icon2->Draw(x,y);x+=32;

icon3->Draw(x,y);x+=32;

icon4->Draw(x,y);x+=32;

icon5->Draw(x,y);x+=40;

}

}

asm mov ah,08h // getch()

asm int 21h

// text mode (80*25)

asm mov ah,0h

asm mov al,03h

asm int 10h

delete icon0;

delete icon1;

delete icon2;

delete icon3;

delete icon4;

delete icon5;

return 0;

}




7. ±× ¹ÛÀÇ Á¤ÁöÈ­»ó Æ÷¸Ë

7.1 TIFF(Tag Image File Format)

.PCX¿Í ÇÔ²² ºñÆ®¸Ê À̹ÌÁö ó¸®ÀÇ ´ëÇ¥ÀûÀÎ ÆÄÀÏ Æ÷¸ËÀÌ´Ù. ƯÈ÷ IBM PC »Ó¸¸ ¾Æ´Ï¶ó ¸ÅŲÅä½Ã, À¯´Ð½º ±â¹ÝÀÇ ¿öÅ©½ºÅ×À̼ǿ¡ À̸£´Â À̽ļºÀ» ÀÚ¶ûÇÑ´Ù. ¿É¼ÇÀ¸·Î LZW ¾ÐÃà ¾Ë°í¸®ÁòÀ» ÀÌ¿ëÇÏ¿© ÆÄÀÏÀÇ Å©±â¸¦ ÁÙÀÏ ¼öµµ ÀÖ´Ù. DTP ¼ÒÇÁÆ®¿þ¾îÀÎ Page Maker¿¡¼­ óÀ½ Á¦¾ÈÇÑ ÀÌ·¡, ´Ü»ö µ¥ÀÌŸºÎÅÍ 24ºñÆ® µ¥ÀÌŸ¿¡ À̸£´Â °¡Àå Æø³ÐÀº µ¥ÀÌŸ ÀúÀå ´É·ÂÀ» ÀÚ¶ûÇÑ´Ù. ƯÈ÷ 6.0 ¹öÀüÀÌ ¹ßÇ¥µÇ¸é¼­ Á¤ÁöÈ­»ó ¾ÐÃà ¾Ë°í¸®ÁòÀÌ Ãß°¡µÇ¾ú´Ù. PC¿¡¼­´Â È®ÀåÀÚ¸¦ ¼¼ ÀÚ±îÁö¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Â °ü°è·Î .TIF·Î Ç¥±âÇÑ´Ù. ÆÇ±ÇÀº Aldus»ç¿Í Microsoft»ç°¡ °®°í ÀÖ´Ù.

7.2 TGA(Truevision Targa)

±×·¡ÇÈ Àü¿ë Àåºñ °³¹ßȸ»ç·Î À¯¸íÇÑ Æ®·çºñÁ¯(Truevision)»ç¿¡¼­ ÀÚ»çÀÇ Çϵå¿þ¾î¸¦ µÚ¹ÞħÇϱâ À§ÇØ °³¹ßÇÑ À̹ÌÁö ó¸® µ¥ÀÌŸ Æ÷¸ËÀÌ´Ù. ±âº»ÀûÀ¸·Î 24ºñÆ® Ç®Ä÷¯ ÀÌ»ó(32ºñÆ® Ä÷¯ -¾ËÆÄ ä³ÎÀÌ Æ÷ÇÔµÈ ÆÄÀÏ ±¸¼º. À©µµ¿ìÁîÀÇ °í±Þ ¸®ÅÍÄ¡ ÇÁ·Î±×·¥°ú ¸ÅŲÅä½ÃÀÇ ÀϺΠ¾ÖÇø®ÄÉÀ̼ǿ¡¼­ ±¸ÇöÇÒ ¼ö ÀÖ´Ù.)À» Áö¿øÇÏ¸ç ¼¶¼¼ÇÑ »ö»ó Ç¥ÇöÀÌ °¡´ÉÇϱ⠶§¹®¿¡ IBM PC¿¡¼­´Â ¹°·Ð ¸ÅŲÅä½Ã¿¡¼­µµ ³Î¸® »ç¿ëµÇ°í ÀÖ´Ù.

RGB ½ÅÈ£¸¦ µðÁöŻȭÇÑ Æ÷¸ËÀ¸·Î µ¥ÀÌŸÀÌ Å©±â Á¦ÇÑÀ̳ª Ç¥Çö »ö»óÀÇ Á¦ÇÑÀº ¾ø´Ù. ÆÄÀÏ Æ÷¸Ë¿¡ ´ëÇÑ ¹öÀü¾÷ÀÌ °ÅÀÇ ÀÌ·ç¾îÁöÁö ¾Ê¾Ò±â ¶§¹®¿¡ ¸ÖƼÇ÷§Æû¿ë Æ÷¸ËÀ¸·Î ÀûÇÕÇÏ´Ù.

7.3 WFW

À©µµ¿ìÁî 3.0ÀÌ ¹ßÇ¥µÇ¸é¼­ Visual BASIC À̳ª Word For Windows ¿Í °°Àº ¾ÖÇø®ÄÉÀ̼ǿ¡¼­ ºñÆ®¸Ê°ú ¾Æ¿ô¶óÀÎÀÇ Áß°£ ¼Ó¼ºÀ» °¡뭸 µ¥ÀÌŸ Æ÷¸ËÀÌ ¿ä±¸µÇ¾î °³¹ßÇÏ¿´´Ù. µû¶ó¼­ ºñÆ®¸Ê À̹ÌÁö¿¡¼­ º¼ ¼ö ÀÖ´Â °è´Ü Çö»óÀ» ¹æÁöÇÒ ¼ö ÀÖÀ¸¸ç ºñÆ®¸Ê°ú ¾Æ¿ô¶óÀÎÀÇ Áß°£ ¼Ó¼ºÀ̹ǷΠÀ©µµ¿ìÁî ¾ÖÇø®ÄÉÀ̼ǿ¡¼­ÀÇ µ¥ÀÌŸ ȣȯÀÌ ÀÚÀ¯·Ó´Ù.

7.4 DFX(Drawing Interchange format)

CAD ¼ÒÇÁÆ®¿þ¾î·Î À¯¸íÇÑ Autodesk »ç¿¡¼­ ÀÚ»çÀÇ AutoCAD ¿¡¼­ »ç¿ëÇϱâ À§ÇÑ º¤ÅÍ ¼Ó¼ºÀ» °®´Â Æ÷¸ËÀÌ´Ù. AutoCAD ÀÇ ½ÃÀåÁ¡À¯À²ÀÌ ³ôÀº °ü°è·Î IBM PC³ª ¸ÅŲÅä½Ã, ¿öÅ©½ºÅ×À̼ǿ¡¼­ ¿î¿ëµÇ´Â CAD ¼ÒÇÁÆ®¿þ¾î¿¡¼­ ÀÌ Æ÷¸ËÀ» Áö¿øÇÑ´Ù.

7.5 CGM(Computer Graphics Metafile)

WFM°ú ¸¶Âù°¡Áö·Î ¾Æ¿ô¶óÀΰú ºñÆ®¸ÊÀÇ Áß°£ ¼º°ÝÀ» °®Áö¸¸ .WFMº¸´Ù ¾Æ¿ô¶óÀÎ ¼Ó¼ºÀÌ °­ÇÏ´Ù. DXF°¡ 3Â÷¿øÀ» Ç¥ÇöÇϴµ¥ ÀûÇÕÇÏ´Ù¸é CGMÀº 2Â÷¿ø Ç¥Çö¿¡ ÁÖ·Î »ç¿ëÇÑ´Ù. ¿ì¸®³ª¶ó¿¡¼­´Â ³Î¸® »ç¿ëÇϰí ÀÖÁö´Â ¾ÊÁö¸¸ ¹Ì±¹ Ç¥ÁØ¾È Çùȸ¿Í ±¹Á¦ Ç¥ÁØÈ­ Çùȸ ÀÎÁõ Æ÷¸ËÀÌ´Ù.(ANSI/ISO 8632 - 1991)

7.6 HP-GL(Hewlett - Packard Graphics Language)

Ãâ·Â±â±âÀÇ °³¹ß, Á¦Á¶ ȸ»çÀÎ ÈÞ·¿ÆÐÄ¿µå »ç¿¡¼­ ÀÚ»ç Ç÷ÎÅÍÀÇ Ãâ·ÂÀ» À§ÇØ Á¦¾ÈÇÑ ÆÄÀÏ ±Ô¾àÀÌ´Ù. Ãâ·Â±ã±â¸¦ Áö¿øÇϵµ·Ï ÇÑ °ÍÀ̱⠶§¹®¿¡ ÆÄÀÏ Æ÷¸ËÀ̶ó±â º¸´Ù´Â Á¦¾î¸í·É±Ô¾àÀ¸·Î º¸´Â °ÍÀÌ ÇÕ¸®ÀûÀÌ´Ù. ¼Õ½¬¿î º¤ÅÍ À̹ÌÁö¸¦ Ç¥±âÇÒ ¼ö ÀÖ¾î ³Î¸® »ç¿ëµÈ´Ù. 1990³â¿¡ HPGL/2 ·Î ¾÷±×·¹ÀÌµå µÇ¾ú´Ù. IBM PC¿¡¼­´Â .PLT¶ó´Â È®ÀåÀڷΠǥ±âÇÑ´Ù.

7.7 Lotus PIC

·ÎÅͽº »çÀÇ ½ºÇÁ·¹µå ½ÃÆ®ÀÎ Lotus 1-2-3¿¡¼­ ±×·¡ÇÁ¸¦ ±×¸± ¶§ »ç¿ëÇÏ´Â Æ÷¸ËÀÌ´Ù. ¾Æ¿ô¶óÀÎ ¼Ó¼ºÀ» °¡Áö°í Àֱ⠶§¹®¿¡ ±ú²ýÇÑ Ãâ·ÂÀ» ¾òÀ» ¼ö ÀÖ´Ù. ½ºÇÁ·¹µå½ÃÆ® ÇÁ·Î±×·¥°ú íƮµå·Î¿ì ÇÁ·Î±×·¡À̶ó¸é ¿¹¿Ü¾øÀÌ ÀÌ Æ÷¸ËÀ» Áö¿øÇϰí ÀÖ´Ù.

7.8 Macintosh PICT

¸ÅŲÅä½Ã¿¡¼­ °¡Àå Æø³Ð°Ô »ç¿ëÇϰí ÀÖ´Â Æ÷¸ËÀ¸·Î ¸Æ¿ë ¿î¿µÃ¼Á¦ÀÎ AppleTalk ¼öÁØ¿¡¼­ Áö¿øÇϰí ÀÖ´Ù. 1ºñÆ® Èæ¹é µ¥ÀÌŸ¿¡¼­ºÎÅÍ ¾ËÆÄ ä³Î¿¡ À̸£±â±îÁö ´Ù¾çÇÑ »ö»óÇ¥ÇöÀÌ °¡´ÉÇÏ´Ù. PC¿¡¼­ÀÇ ÀϺΠÇÁ·Î±×·¥°ú ¿öÅ©½ºÅ×À̼ǿ¡¼­ Áö¿øÇÑ´Ù.

7.9 EPS(Encapsulated PostScript)

Æ÷½ºÆ®½ºÅ©¸³Æ® ÇüÅÂÀÇ ÆÄÀÏ Æ÷¸ËÀ¸·Î ºñÆ®¸Ê°ú º¤ÅÍ À̹ÌÁö¸¦ ÇÔ²² ÀúÀåÇÒ ¼ö ÀÖ´Ù. °íÀ¯ÀÇ ÆÄÀÏ ¸ðÆÖÀ̶ó±â º¸´Ù´Â ÇÁ¸°Åͳª ´Ù¸¥ Ãâ·Â ÁÖº¯ ±â±â¸¦ Áö¿øÇϱâ À§ÇØ °³¹ßµÈ Æ÷¸ËÀ¸·Î °¡Àå ¶Ù¾î³­ Ãâ·Â ÇØ»óµµ¸¦ ÀÚ¶ûÇÑ´Ù. ÁÖ·Î 1,200 dpi ÀÌ»óÀÇ Ãâ·Â±â¿¡¼­ °íÇØ»óµµ Ãâ·ÂÀ» ÇÒ ¶§ ÀÌ Æ÷¸ËÀ¸·Î ÀúÀåÇϸç Ä÷¯ ºñÆ®¸Ê µ¥ÀÌŸ¸¦ ÀÌ Æ÷¸ËÀ¸·Î ÀúÀåÇϸç Ä÷¯ ºñÆ®¸Ê µ¥ÀÌŸ¸¦ ÀÌ Æ÷¸ËÀ¸·Î ÀúÀåÇϸé CMYK ºÐÆÇ Ãâ·ÂÀÌ °¡´ÉÇÏ´Ù. ÀÏ·¯½ºÆ® ÇÁ·Î±×·¥µé¿¡¼­´Â ¿¹¿Ü¾øÀÌ Áö¿øÇϰí ÀÖÀ¸¸ç, IBM PC¿¡¼­ ¸ÅŲÅä½Ã, À¯´Ð½º ±â¹ÝÀÇ ¿öÅ©½ºÅ×À̼ǿ¡ ¾Æ¸£´Â Æø³ÐÀº À̽ÄÀÌ °¡´ÉÇÏ´Ù. ÆÇ±ÇÀº Adobe System »ç°¡ °®°í ÀÖ´Ù.

7.10 GEM

DTP ¼ÒÇÁÆ®¿þ¾îÀÎ Ventura Publisher ¿¡¼­ »ç¿ëÇÏ´Â Æ÷¸ËÀ¸·Î .IMG È®ÀåÀÚ·Î º¯È¯ÇÏ¿© »ç¿ëÇϱ⵵ ÇÑ´Ù. ÇöÀç¿¡´Â ±×¸® ³Î¸® »ç¿ëÇÏÁö´Â ¾Ê°í ÀÖ´Ù.

7.11 WPG(WordPerfect Graphic)

¿öµå ÇÁ·Î¼¼¼­ ÇÁ·Î±×·¥ÀÎ WordPerfect¿¡¼­ »ç¿ëÇÏ´Â Æ÷¸ËÀ¸·Î .CGM À̳ª .WFM°ú ºñ½ÁÇÑ ¼Ó¼ºÀ» °®´Â´Ù. 256 Ä÷¯ ÀÌÇÏÀÇ »ö»ó Ç¥ÇöÀÌ °¡´ÉÇÏ´Ù.

7.12 ART

ÇϴüҰ¡ Á¦ÀÛÇÑ ÇÏ´ÃÀÇ °íÀ¯ Æ÷¸Ë, 2.0 ÀÌÀü¿¡¼­´Â Çãŧ·¹½ºÀÇ ´Ü»ö, 2.0ÀÌÈÄ¿¡¼­´Â VGA 16»ö5À» »ç¿ëÇÑ´Ù. °°Àº ARTÀ̸鼭µµ ¼­·Î ȣȯ¼ºÀº ¾ø´Ù. ART ÆÄÀÏÀ» ´Ù¸¥ Æ÷¸ËÀ¸·Î º¯È¯ÇÏ·Á¸é Çϴÿ¡¼­ PCX·Î ÀúÀåÇÏ¸é µÈ´Ù. ±¹³»¿¡¼­ ¹ß°ßµÇ´Â ART´Â À§ÀÇ Æ÷¸ËÀ̰í, First Publi Sher¿¡¼­µµ °°Àº À̸§ÀÇ Æ÷¸ËÀ» ¾²´Âµ¥ ÇϴüÒÀÇ ART¿Í´Â ´Ù¸¥ °ÍÀÌ´Ù.

7.13 CEL

¿ÀÅä¾Ö´Ï¸ÞÀÌÅÍ¿¡¼­ ¼¿À̶ó´Â À̹ÌÁö ÆÄÀÏÀ» ¸¸µç´Ù. ¸¸È­ Á¦ÀÛ¿¡¼­ ¹è°æ À§¿¡ ³õ´Â ¼¿·ê·ÎÀ̵å¶ó´Â ÆÇ À§¿¡ ±×¸²À» ±×¸®´Âµ¥ ±× ¶§ ¾²ÀÌ´Â ¼¿·ü·ÎÀ̵带 ÁÙ¿©¼­ ¼¿À̶ó°í ÇÑ´Ù.

7.14 HGE

ÀÌ°Í ¶ÇÇÑ ¸ù´ç¿¬ÇÊÀ̶ó´Â Çѱ¹»ê ÇÁ·Î±×·¥¿¡¼­ ÀÌ·ç¾îÁö´Â ±×·¡ÇÈ Æ÷¸ËÀÌ´Ù. ÇãÄð·¹½º ±×·¡ÇÈ Ä«µå¿¡¼­ »ç¿ëµÇ´ø ±×·¡ÇÈ ¼ÒÇÁÆ®¿þ¾î¿ë Æ÷¸ËÀÌ´Ù. ¾Æ·¡¾Æ Çѱۿ¡¼­ ºÒ·¯¿À±â¸¦ ÇÒ ¼öµµ ÀÖ´Ù.

7.15 PZI

À¯¸íÇÑ È­¸é ĸÃÄ ÇÁ·Î±×·¥ÀÎ Pizzax Plus¿¡¼­ »ç¿ëµÇ´Â ÅØ½ºÆ®/±×·¡ÇÈ È­¸é ĸÃÄ Æ÷¸ËÀÌ´Ù. PZI Æ÷¸ËÀº ÇÇÀÚÁî Ç÷¯½º¿¡¼­¸¸ Áö¿øÇϹǷΠ´Ù¸¥ ¼ÒÇÁÆ®¿þ¾î¿¡¼­ »ç¿ëÇÏ·Á¸é ÇÇÀÚÁî ÀÚü¿¡¼­ ´Ù¸¥ Æ÷¸ËÀ¸·Î º¯È¯ÇÏ¿© »ç¿ëÇÏ¸é µÈ´Ù.

7.16 RLE

ºñ¾ÐÃàÇüÀÎ BMPÀÇ ¿ë·® ¹®Á¦¸¦ °³¼±ÇÑ Æ÷¸ËÀ¸·Î RLE ¾ÐÃà ¾Ë°í¸®ÁòÀ» »ç¿ëÇÑ´Ù. RLE ¾ÐÃà ¾Ë°í¸®ÁòÀº °£´ÜÇÑ ±×¸² µîÀ» ¾ÐÃàÇϴµ¥ ºñ±³Àû È¿°úÀûÀ̸ç ÀÐ°í ¾²´Â ½Ã°£µµ ºü¸¥ ÆíÀÌ´Ù.

7.17 SS

VGA Àü¿ëÀÇ ±×·¡ÇÈ ¼ÒÇÁÆ®¿þ¾îÀÎ SplashÀÇ ±×·¡ÇÈ Æ÷¸ËÀÌ´Ù. Splash´Â Ç¥ÁØ VGA(320¡¿200 ÇØ»óµµ 256»ö ¸ðµå)¸¸À» Áö¿øÇϴµ¥ ±Ù·¡¿¡´Â ´ëºÎºÐÀÇ ÆäÀÎÆÃ ÇÁ·Î±×·¥¿¡¼­ ½´ÆÛ VGA¸¦ Áö¿øÇϹǷΠ°ÅÀÇ »ç¿ëµÇÁö ¾Ê°í ÀÖ´Ù.

7.18 PMC

A4 ½ºÄ³³ÊÀÇ ¹øµé¿ëÀÎ Image 256 ÀÇ °íÀ¯ Æ÷¸ËÀÌ´Ù.(Image 72ÀÇ 256¹öÁ¯À¸·Î 640¡¿480ÇØ»óµµ¿¡ 256 Ä®¶ó Áö¿øÇÏ´Â Æ÷¸Ë) Image 256Àº PCXµµ Áö¿øÇϹǷΠ½ÇÁ¦·Î´Â PCX·Î ÀúÀåÇÏ¿© »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù.

7.19 PMT

Äü ¸¶¿ì½ºÀÇ ¹øµé¿ëÀ¸·Î Á¦°øµÇ´Â Image 72ÀÇ °íÀ¯ Æ÷¸ËÀÌ´Ù. ´Ü»öºÎÅÍ 16»ö±îÁö ¹Û¿¡ Áö¿øÇÏÁö ¾Ê´Â´Ù. true Ä®¶ó¸¦ ÁöÇâÇÏ´Â ¿À´Ã¿¡´Â º°·Î »ç¿ë°¡Ä¡°¡ ¾ø´Ù.

7.20 RIF

Fractal Design PainterÀÇ °íÀ¯ Æ÷¸ËÀÌ´Ù. ´Ù¸¥ ÇÁ·Î±×·¥¿¡¼­ »ç¿ëÇÏ·Á¸é TIFFÆÄÀÏ·Î ÀúÀåÇÏ¿© »ç¿ëÇÏ¿©¾ß ÇÑ´Ù.




8. ÆÄÀÏ ¾ÐÃà ±Ô¾à

8.1 JPEG(Joint Photographic Experts Group)

ÀϹÝÀûÀÎ ±×·¡ÇÈ ÆÄÀÏÀ» °íÇØ»óµµ¿¡¼­ ÀÛ¾÷À» ÇÏ¸é ±× µ¥ÀÌŸ ¾çÀº ¾î¸¶¾î¸¶ ÇØÁö´Â °ÍÀÌ ÀϹÝÀûÀÌ´Ù. ºê·Î½´¾î³ª īŻ·Î±× µî¿¡ »ðÀÔÇÏ´Â °£´ÜÇØ º¸ÀÌ´Â ÄÆ¸¶Àúµµ ½±°Ô ¼ö½Ê MB´Â ÃæºÐÈ÷ ³Ñ´Â Å©±âÀÌ´Ù. °Ô´Ù°¡ ±×·¡ÇÈ Æ÷¸ËÀº ÀϺθ¦ Á¦¿ÜÇϰí´Â ÆÄÀÏ Æ÷¸Ë ÀÚü¿¡ ÀÏÁ¤ Á¤µµ ¾ÐÃàÇÏ¿© ÀúÀåÇϱ⠶§¹®¿¡ ÀϹÝÀûÀÎ ÆÄÀÏ ¾ÐÃà ±â¹ýÀ¸·Î´Â Å©°Ô È¿°ú¸¦ º¸Áö ¸øÇÏ´Â °æ¿ì°¡ ¸¹´Ù. »Ó¸¸ ¾Æ´Ï¶ó ÀÏ¹Ý ÆÄÀÏ ¾ÐÃà ±â¹ýÀ» »ç¿ëÇÏ¿© ±×·¡ÇÈ ÆÄÀÏÀ» ¾ÐÃàÇÏ¸é ÆÄÀÏÀ» »ç¿ëÇÒ ¶§¿¡´Â ´Ù½Ã ¾ÐÃàÀ» ÇØÁ¦ÇØ¾ß Çϴµ¥ ÀÌ °æ¿ì ÇÏµå µå¶óÀ̺êÀÇ ¿©À¯ °ø°£ÀÌ ºÎÁ·Çϸé ÀÔÃàÀ» ÇØÁ¦Á¶Â÷ ¸øÇÏ´Â ½É°¢ÇÑ »çŰ¡ ¹ú¾îÁö´Â °æ¿ìµµ ÀÖ´Ù.

À̸¦ ÇØ¼ÒÇϱâ À§ÇØ Á¦¾ÈÇÑ Æ÷¸ËÀÌ JPEGÀÌ´Ù. JPEG´Â À̹ÌÁö°¡ Å©°Ô ¼Õ»óµÇÁö ¾Ê´Â ¹üÀ§(À̸¦ »ç¿ëÀÚ°¡ Á¶ÀýÇÒ ¼ö ÀÖµµ·Ï ±¸¼ºµÇ¾î ÀÖ´Ù.)¿¡¼­ À̹ÌÁö Àüü¸¦ ¾ÐÃàÇÑ´Ù. µû¶ó¼­ °í¹Ðµµ·Î ¾ÐÃàÇÒ ¼ö Àִµ¥ ÀϹÝÀûÀÎ ¾ÐÃà ºñÀ²Àº 8:1¿¡¼­ 16:1ÀÇ ¹üÀ§ÀÌ´Ù. ÇÏÁö¸¸ Áö³ªÄ¡°Ô ¾ÐÃàÀ²ÀÌ ³ôÀ» °æ¿ì À̹ÌÁö°¡ ½ÉÇÏ°Ô ¼Õ»óµÇ¹Ç·Î ¾ÐÃàÀ²À» ¼³Á¤ÇÒ ¶§ ÁÖÀÇÇÏ¿©¾ß ÇÑ´Ù.

8.2 MPEG(Moving Pictures Experts Group)

±¹Á¦ Ç¥ÁØÈ­ Çùȸ(ISO) »êÇÏÀÇ ÇÑ À§¿øÈ¸ÀÎ MPEG¿¡¼­ Á¦¾ÈÇÑ µ¿È­»ó ¾ÐÃà Æ÷¸ËÀÌ´Ù. MPEG´Â ´Ù¾çÇÑ CD Æ÷¸ËÀÇ ÃâÇö°ú ÇÔ²² µ¿È­»óÀÇ °í¹Ðµµ ¾ÐÃà¿¡ ´ëÇÑ ¿ä±¸¿¡ ´ëÇÑ ¹Ý¿µÀÌ´Ù.

VHS ¼öÁØÀÇ È­Áú·Î ¾ÐÃàÇÒ ¼ö ÀÖ´Â MPEG-1 ±Ô°Ý°ú SVHS ¼öÁØÀÇ MPEG-2 ±Ô°ÝÀÌ ÀÖÀ¸¸ç ÃÖ±Ù¿¡ MPEG-2 ±Ô°ÝÀÌ »ê¾÷ Ç¥ÁØÀÌ µÇ¾ú´Ù. CD-¥°, CD-¥´ µîÀÇ Á¦ÀÛ¿¡ Ç¥ÁØÀ¸·Î »ç¿ëµÇ°í ÀÖÀ¸¸ç ÀϹÝÀûÀÎ ¾ÐÃàÀ²Àº 4:1 Á¤µµÀÌ´Ù.

ÇÏÁö¸¸ MPEG Æ÷¸ËÀº º°µµÀÇ Àü¿ë ¾ÐÃà ÇØÁ¦ Àåºñ¸¦ ¸¶·ÃÇØ¾ß ÇÑ´Ù´Â Á¡¿¡¼­ »ç¿ëÀÚ¿¡°Ô ºÎ´ãÀ» ÁØ´Ù. À©µµ¿ìÁî°¡ »ó¾÷ÀûÀ¸·Î ¼º°øÀ» Çϸ鼭 º°µµÀÇ Àåºñ¾øÀ̵µ µ¿È­»óÀ» ±¸ÇöÇÒ ¼ö ÀÖ´Â Æ÷¸ËÀÌ ¿ä±¸µÇ¾ú´Âµ¥ ÀÌ¿¡ ´ëÇÑ ÇØ´äÀÌ Video for Windows ¿Í QuickTime for Windows ÀÌ´Ù.




9. Computer Animation

9.1 ¿¡´Ï¸ÞÀ̼ÇÀÇ Á¤ÀÇ

ÄÄÇ»ÅÍ ±×·¡ÇÈÀÇ ÀÀ¿ë¹üÀ§´Â 2Â÷¿ø ÀÀ¿ë°ú 3Â÷¿ø ÀÀ¿ëÀ¸·Î ³ª´­¼ö ÀÖ´Ù. 2Â÷¿ø ÀÀ¿ëÀº Æò¸éÀ¸·Î Ãâ·ÂµÇ´Â ¸ðµç À̹ÌÁö¸¦ ÁöĪÇÏ´Â °ÍÀ¸·Î õ¹®, ±â»ó ÀÚ·á ¿µ»ó󸮸¦ °¡´ÉÄÉ ÇÏ´Â À̹ÌÁö ÇÁ·Î¼¼½Ì, ÀÇ»ó µðÀÚÀÎ, ¸ÞÀÌÅ©¾÷ ½Ã¹Ä·¹ÀÌ¼Ç µîÀÌ ¿©±â¿¡ ¼ÓÇÑ´Ù. 3Â÷¿ø ÀÀ¿ëÀº Çö½Ç¿¡¼­ ¸¸µé¾î³»±â Èûµé°Å³ª ºÒ°¡´ÉÇÑ ºÎºÐµéÀ» ÄÄÇ»ÅÍ È­¸é»ó¿¡¼­ ¸ðÀÇ ½ÇÇèÇØ º¼¼ö ÀÖ´Â ºÐ¾ß·Î °ÇÃ౸Á¶¹°À» µðÀÚÀÎÇϰųª Ç×°ø±â ¸ðÀǽÇÇè,¿µÈ­Á¦ÀÛ µî¿¡ ÀÀ¿ëµÉ¼ö ÀÖÀ¸¸ç CAD/CAM ºÐ¾ß°¡ ´ëÇ¥ÀûÀÌ´Ù.

ÄÄÇ»ÅÍ ¿¡´Ï¸ÞÀ̼ÇÀº »ïÂ÷¿ø °ø°£¿¡ ½Ã°£ÀÇ ÃàÀ» ´õÇÑ °ÍÀ¸·Î ½Ã°£¿¹¼úÀ̶ó°íµµ ÇÒ ¼ö ÀÖ´Ù. ¿¡´Ï¸ÞÀ̼ÇÀ̶õ ¾î¶² »ç¹°ÀÌ ¿òÁ÷ÀÌ´Â °Íó·³ À̹ÌÁö¸¦ ¸¸µé¾î ³»´Â ÀÛ¾÷ÀÇ ÀÏÁ¾ÀÌ´Ù. À̰ÍÀº ¾î¶² ƯÁ¤ÇÑ »ç¹°¿¡ Anima(»ý¸í)À» ºÎ¿©ÇÑ´Ù´Â °ÍÀ¸·Î, ÄÄÇ»Å͸¦ ÀÌ¿ëÇÏ¿© ½ÇÁ¦·Î ´«¿¡ º¸ÀÌ´Â ¿òÁ÷ÀÓÀ» ¸¸µé¾î ³»´Â °ÍÀ» ¸»ÇÑ´Ù.

9.2 ¿¡´Ï¸ÞÀ̼ÇÀ» ÇϱâÀ§ÇÑ µµ±¸

9.2.1 ±×·¡ÇÈ º¸µå

IBM-PC AT ȣȯ±âÁ¾¿¡¼­ »ç¿ë°¡´ÉÇÑ ±×·¡ÇÈÄ«µå·Î´Â VGAÄ«µå¿Í VGA¿¡¼­ÀÇ ÇØ»óµµ¸¦ Çâ»ó½ÃŲ SUPER VGA°¡ ÀÖÀ¸³ª Àü¹®ÀûÀÎ ¿¡´Ï¸ÞÀ̼ÇÀ» ¿øÇÒ °æ¿ì´Â Àü¹®°¡¿ëÀÎ TARGA³ª VISTA, EVEREX º¸µå¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù. ¿ä»õ ¸¹ÀÌ ¾²´Â ½´ÆÛ VGA µµ »ç¿ëÇØµµ º° ¹«¸®°¡ ¾ø´Ù. ³ôÀº ÇØ»óµµ¿Í ¿©·¯°¡Áö »ö»óÀ» °¡Áö°í ÀÖ´Â Àü¹® ±×·¡ÇÈ º¸µåµéÀÌ ¿¡´Ï¸ÞÀ̼ÇÀ» Çϴµ¥ Çʼö Á¶°ÇÀ̶ó ÇÒ¼ö ÀÖ´Ù. Ÿ°¡ º¸µå¸¦ »ç¿ëÇÏ¸é ¾î´À Á¤µµ ¼Óµµ¸¦ °®Ãß°í ÇØ»óµµ ¶ÇÇÑ Áö¿øµÈ´Ù. ±×·¡ÇÈ º¸µå¸¶´Ù ĨÀÇ Á¾·ù°¡ ´Ù¸¥µ¥ MDA, HGC, CGA µî¿¡¼­´Â ¸ðÅä·Ñ¶ó 6845CRTC¸¦ »ç¿ëÇϸç EGA¿¡¼­´Â ·¹Áö½ºÅÍÀÇ Àü¿ë LSIĨÀ» »ç¿ëÇÑ´Ù. À̰ÍÀÌ ÇØ»óµµ¸¦ °áÁ¤ÇÏ´Â Áß¿äÇÑ ¿äÀÎÀ¸·Î ÀÛ¿ëÇÑ´Ù. ¼Óµµ¿¡ °ü°èµÇ´Â °ÍÀÌ ºñµð¿À ·¥Àε¥ ¿µ¿ªÀÌ Å©¸é Ŭ¼ö·Ï ÇØ»óµµ°¡ ÁÁ¾ÆÁø´Ù. ±×·¯¹Ç·Î ±×·¡ÇÈ º¸µå¸¦ ¼±ÅÃÇÒ¶§ °¡Àå Áß¿äÇÑ °ÍÀº ÇØ»óµµ¿Í Áö¿ø»ö»óÀÌ´Ù.

9.2.2 ¸ð´ÏÅÍ

¿ÜºÎ ¸ð´ÏÅÍ´Â Composite¿Í RGB ¾Æ³ª·Î±×¸¦ Áö¿øÇϸç, ¾Æ³¯·Î±×ÀÇ °æ¿ì´Â ¸ÖƼ½ÌÅ© ¸ð´ÏÅ͸¦ »ç¿ëÇØ¾ß ÇÑ´Ù. ¸ÖƼ½ÌÅ©´Â NEC»ç¿¡¼­ ¼öÁ÷ ¹× ¼öÆòÁ֯ļö¸¦ ÀÏÁ¤ ¹üÀ§³»¿¡¼­ Á¶ÀýÇÒ¼ö ÀÖ´Â ¸ð´ÏÅÍ´Ù. ÀϹÝÀûÀ¸·Î »ç¿ëÇÏ´Â °ÍÀº 14ÀÎÄ¡(1024X768)¸ÖƼ ½ÌÅ©°¡ ÁÖ·ù¸¦ ÀÌ·é´Ù. ±×¹Û¿¡ R, G, BÀüÀÚÃÑÀ¸·ÎºÎÅÍ ¼­·Î ´Ù¸¥ ÇüÅÂÀÇ ÀÔ·ÂÀ» ¹Þ¾ÆµéÀÌ´Â µðÁöÅ» Ä®¶ó ¸ð´ÏÅÍÀÎ RGB ¸ð´ÏÅͰ¡ ÀÖ´Ù.ÀÌ ¸ð´ÏÅÍ´Â TV¿ªÇÒµµ Çϳª Composite ¸ð´ÏÅͿʹ ´Ù¸£´Ù. ¸ð´ÏÅÍ ¼±ÅÃÀÇ °æ¿ì Á֯ļö¸¦ »ìÆìºÁ¾ß Çϸç Á֯ļö°¡ ³·À» °æ¿ì ½±°Ô ÇǷΰ¨À» ÁÙ¼ö ÀÖ´Ù. ±×·¯¹Ç·Î ³ôÀº °ÍÀ» ¼±ÅÃÇÏ´Â °ÍÀÌ ÁÁ´Ù.¸ÖƼ½ºÄµÀÇ °æ¿ì ÃÖÇÏ 15KHZ ºÎÅÍ 35KHZÀÇ Á֯ļö°¡ ÁÁ´Ù. ¶ÇÇÑ µµÆ® ÇÍÄ¡µµ »ý°¢ÇØ ºÁ¾ß ÇÑ´Ù. 14ÀÎÄ¡ÀÇ °æ¿ì 0.28mmÁ¤µµÀÇ µµÆ® ÇÍÄ¡¸¦ °¡Á®¾ß Çϸç 17ÀÎÄ¡ÀÇ °æ¿ì´Â ÃÖ¼ÒÇÑ 0.31mmÁ¤µµÀÇ ÇÍÄ¡¸¦ °¡Á®¾ß¸¸ ÇÑ´Ù

9.2.3 ¸¶¿ì½º,Æ®·¢º¼

¸¶¿ì½º, Æ®·¢º¼Àº ¸ðµÎ Æ÷ÀÎÆÃÀ» Çϱâ À§ÇÑ °ÍÀε¥ ¸¶¿ì½º´Â º¼/±¤¸¶¿ì½º·Î ³ª´µ¾î Áö°í À̰ÍÀº ±×·¡ÇÈ È¯°æ¿¡¼­ Æí¸®ÇÏ°Ô »ç¿ëÇÏ´Â º¸´Ù ¼¼¹ÐÇÑ °÷ÀÇ ÁöÁ¤À» Æí¸®ÇÏ°Ô Çϸç Á¼Àº °ø°£¿¡¼­µµ »ç¿ëÇÒ¼ö ÀÖ´Ù. ±×·¡ÇÈÀ» Çϱâ À§Çؼ­¸é 200DPIÀÌ»óÀÇ ÇØ»óµµ¸¦ °¡Áø ¸¶¿ì½º°¡ ÁÁ´Ù.

9.2.4 ±×·¡ÇÈ Å¸ºí·¿

µðÁöŸÀÌÀú(Digitizer)´Â º¹ÀâÇÑ ±×¸²À» ÄÄÇ»ÅÍ¿¡ ÀԷ½Ã۱â À§ÇØ °í¾ÈµÈ µµ±¸ÀÌ´Ù. µðÁöŸÀÌ¡ Ÿºí·¿(Tablet)À¸·Î Ÿºí·¿ ÆÐµå¿Í ¿©±â¿¡ ¿¬°áµÈ ½ºÅ¸ÀÏ·¯ÆæÀ¸·Î Ÿºí·¿ ÆÐµåÀ§¿¡ ±×¸° Á¤º¸°¡ ÄÄÇ»ÅÍ·Î ³Ñ¾î°¡ ÀÛ¾÷À» ÇÒ¼ö ÀÖ°Ô ÇØ ÁØ´Ù. ÀüÅëÀûÀÎ ±×¸² ±×¸®±â ±â¹ý¿¡ Àͼ÷ÇÑ »ç¿ëÀÚµéÀºÁÁÀº ÀÔ·Â ±â±¸°¡ µÉ°ÍÀÌ´Ù.

9.2.5 ½ºÄ³³Ê

½ºÄ³³Ê´Â È­»ó ÀÔ·ÂÀåÄ¡ÀÌ´Ù. Ä÷¯¿Í Èæ¹éÀ» »ç¿ëÇÒ¼ö Àִµ¥ ¿äÁò¿£ °â¿ëÀÇ °æ¿ì°¡ ¸¹´Ù. ½ºÄ³³Ê·Î ÀÔ·ÂµÈ ±×¸²Àº ¹Ø±×¸²À¸·Î ¾²°Å³ª, ¸ÅÇÎ¿ë ±×¸², ¹è°æ µîÀ¸·Î ¾²ÀδÙ. ½ºÄ³³Ê´Â »çÁøÀ̳ª ±×¸² µîÀÇ ÀڷḦ Ȱ¿ëÇϱ⠿ëÀÌÇÏ´Ù. ½ºÄ³³Ê¿Í ºñ½ÁÇÏ°Ô »ç¿ëÇÏ´Â °ÍÀ¸·Î ºñµð¿À Ä«¸Þ¶ó¿Í ĸÃç º¸µå°¡ Àִµ¥ ÇØ»óµµ¸é¿¡¼­ ¶³¾îÁö´Â °æÇâÀÌ ÀÖÁö¸¸ °¡°Ýµµ Àú·ÅÇÏ°í ´Ù¿ëµµ·Î »ç¿ëÇÒ¼ö ÀÖ´Ù´Â Á¡¿¡¼­ ¸¹ÀÌ »ç¿ëÇϰí ÀÖ´Ù.




10. FLIC

10.1 FLI

Auto CAD ¿Í 3D Studio·Î À¯¸íÇÑ Autodesk»çÀÇ Auto AnimatorÆ÷¸ËÀ¸·Î 320*200 ÇØ»óµµ¿¡¼­ 256»öÀÇ ¾Ö´Ï¸ÞÀ̼ÇÀ» ÀúÀåÇÏ´Â Æ÷¸ËÀÌ´Ù. Old FlicÀ¸·Î ºÒ¸®¿öÁø´Ù.

10.2 FLC

¿ÀÅä¿¡´Ï¸ÞÀÌÅÍ¿¡¼­ ¹öÀü¾÷ÇÑ ¿ÀÅä¾Ö´Ï¸ÞÀÌÅÍ ÇÁ·ÎÀÇ Æ÷¸ËÀ¸·Î ÃÖ´ë 1024*768 ÇØ»óµµ¿¡¼­ 256 »öÀÇ ¾Ö´Ï¸ÞÀ̼ÇÀ» ÀúÀåÇÒ ¼öµµ ÀÖ´Ù. New FlicÀ¸·Î ºÒ¸®¿öÁø´Ù.

10.3 FLIC Player Source

/*

±â´É : 320*200 256 color ¸ðµå¿¡¼­ animation È­ÀÏÀ» º¸¿©ÁÜ

¸Þ¸ð¸® ¸ðµ¨ : large model »ç¿ë

ÇÁ·Î±×·¥ : ±è Çö±â

*/

#include <fcntl.h>

#include <dos.h>

#include <io.h>

#include <conio.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include "flic.h"

#if !defined(__TURBOC__)

#define asm __asm

#define outportb outp

#endif

char *FrameBuff;

static Flic flic;


/* x,yÀÇ ÁÂÇ¥¿¡ color»öÀ» ÂïÀ½ */

void point(int x,int y,int color)

{

int i;

if(x>320 || y>200) return;

i=y*320+x;

asm mov ax,0xA000

asm mov es,ax

asm mov ax,color

asm mov di,i

asm stosb

}

/* x,y ÀÇ ÁÂÇ¥¿¡¼­ count ¼ö ¸¸Å­ dataÀÇ »öÀ» 1 byte ¾¿ ¹Ýº¹ Ãâ·Â */

void screen_repeat_one( int x,int y,Uchar data,int count )

{

int i;

if(x>320 || y>200) return;

if(x+count > 320) count=320-x;

i=y*320+x;

asm mov ax,0xA000

asm mov es,ax

asm mov al,data

asm mov di,i

asm mov cx,count

asm rep stosb

}

/* x,y ÀÇ ÁÂÇ¥¿¡¼­ count ¼ö ¸¸Å­ p2ÀÇ »öÀ» 2 byte ¾¿ ¹Ýº¹ Ãâ·Â */

void screen_repeat_two( int x,int y,Pixels2 p2,int count )

{

int i;

if(x>320 || y>200) return;

if(x+(count<<1) > 320) count=(320-x)>>1;

i=y*320+x;

asm mov ah,byte ptr p2.pixels[1]

asm mov al,byte ptr p2.pixels[0]

asm mov cx,0xA000

asm mov es,cx

asm mov di,i

asm mov cx,count

asm rep stosw

}

/* bufferÀÇ ³»¿ëÀ» È­¸éÀÇ x,y ÁÂÇ¥¿¡ count¼ö ¹ÝÅ­ º¹»ç */

void screen_copy_seg( int x,int y,char *buffer,int count )

{

if(x>320 || y>200) return;

if(x+count > 320) count=320-x;

memcpy((char far *)0xA0000000+y*320+x,buffer,count);

}

/* VGA Ä«µåÀÇ ÆÈ·¹Æ® ·¹Áö½ºÅ͸¦ start¿¡¼­ count¼ö ¸¸Å­ dacÀÇ °ªÀ¸·Î º¯°æ */

void write_dac( int start, int count, Uchar *dac )

{

int i, max = count * 3;

outportb(0x03c8, start );

for( i = 0; i < max ; i++ )

{

outportb( 0x03c9, *(dac++ ) );

}

}

/* 0-255 ÀÇ ¹üÀ§ÀÇ RGB(Red,Green,Blue)°ªÀ» °¡Áø ºü·¹Æ® °ªµéÀ»

0-63 ¹üÀ§ÀÇ VGA Ä«µå°¡ ó¸®ÇÏ´Â °ªÀ¸·Î Á¶Á¤Çؼ­ ºü·¹Æ® º¯°æ */

void decode_color_256(Uchar *data)

{

signed short start = 0,i;

Uchar *cbuf = (Uchar *)data;

signed short *wp = (short *)cbuf;

signed short ops;

signed short count;

ops = *wp;

cbuf += sizeof(*wp);

while( --ops >= 0 )

{

start += *cbuf++;

if ((count = *cbuf++) == 0 ) count = 256;

for( i = 0 ; i < (3*count) ; i++ )

*(cbuf+i) = *(cbuf+i) >> 2;

write_dac(start,count,cbuf);

cbuf += 3*count;

start += count;

}

}

/* 0-63 ÀÇ ¹üÀ§ÀÇ RGB(Red,Green,Blue)°ªÀ» °¡Áø ºü·¹Æ® °ªµéÀ»

º¯°æ¾øÀÌ »ç¿ëÇÏ¿© VGA Ä«µåÀÇ ºü·¹Æ® º¯°æ */

void decode_color_64(Uchar *data)

{

signed short start = 0,i;

Uchar *cbuf = (Uchar *)data;

signed short *wp = (short *)cbuf;

signed short ops;

signed short count;

ops = *wp;

cbuf += sizeof(*wp);

while( --ops >= 0 )

{

start += *cbuf++;

if ((count = *cbuf++) == 0 ) count = 256;

write_dac(start,count,cbuf);

cbuf += 3*count;

start += count;

}

}

/* ÀϹÝÀûÀÎ run-length ¹æ½ÄÀ¸·Î ¾ÐÃàµÈ À̹ÌÁö µ¥ÀÌŸ¸¦ Ç®¾î¼­

È­¸é¿¡ displayÇØ ÁÜ */

void decode_byte_run(Uchar *data,Flic *flic)

{

int x,y;

int width = flic->head.width;

int height = flic->head.height;

char psize;

unsigned char *cpt = data;

int end;

y = flic->yoff;

end = flic->xoff+width;

while( --height >= 0 ) {

x = flic->xoff;

cpt += 1;

psize = 0;

while((x+=psize) < end)

{

psize = *cpt++;

if(psize > 0) screen_repeat_one( x,y,*cpt++,psize );

else {

psize = -psize;

screen_copy_seg( x,y,cpt,psize );

cpt += psize;

}

}

y++;

}

}

/* delta fli ¹æ½ÄÀ¸·Î ¾ÐÃàµÈ À̹ÌÁö µ¥ÀÌŸ¸¦ Ç®¾î¼­ È­¸é¿¡ displayÇØ ÁÜ */

void decode_delta_fli(Uchar *data,Flic *flic)

{

signed short *wpt = (short *)data;

Uchar *cpt = (Uchar *)(wpt+2);

int xorg = flic->xoff;

int yorg = flic->yoff;

int x,y;

short lines;

Uchar opcount;

char psize;

y = yorg + *wpt++;

lines = *wpt;

while (--lines >= 0)

{

x= xorg;

opcount = *cpt++;

while( opcount > 0 )

{

x += *cpt++;

psize = *cpt++;

if (psize < 0 ) {

psize = -psize;

screen_repeat_one( x,y,*cpt++,psize );

x += psize;

opcount -= 1;

}

else {

screen_copy_seg( x,y,(Uchar *)cpt,psize );

cpt += psize;

x += psize;

opcount -= 1;

}

}

y++;

}

}

/* delta flc ¹æ½ÄÀ¸·Î ¾ÐÃàµÈ À̹ÌÁö µ¥ÀÌŸ¸¦ Ç®¾î¼­ È­¸é¿¡ displayÇØ ÁÜ */

void decode_delta_flc(Uchar *data,Flic *flic)

{

Pixels2 p2;

int xorg = flic->xoff;

int yorg = flic->yoff;

int width = flic->head.width;

int x,y;

short lp_count;

short opcount;

int psize;

union {short *w; Uchar *ub; char *b; Pixels2 *p2; } wpt;

int lastx;

lastx = xorg + width -1;

wpt.ub = data;

lp_count = *wpt.w++;

y = yorg;

goto LPACK;

SKIPLINES :

y -= opcount;

LPACK :

opcount = *wpt.w++;

if (opcount >= 0 )

goto DO_SS2OPS;

if ( ((unsigned short)opcount) & 0x4000 )

goto SKIPLINES;

point( lastx,y,opcount);

if((opcount = *wpt.w++) == 0)

{

++y;

if(--lp_count > 0 )

goto LPACK;

goto OUT;

}

DO_SS2OPS :

x = xorg;

PPACK :

x += *wpt.ub++;

psize = *wpt.b++;

if ((psize += psize) >= 0 )

{

screen_copy_seg(x,y,wpt.ub,psize);

x += psize;

wpt.ub += psize;

if( --opcount != 0 )

goto PPACK;

++y;

if( --lp_count > 0 )

goto LPACK;

}

else

{

psize = -psize;

screen_repeat_two( x,y,*wpt.p2++,psize>>1 );

x += psize;

if( --opcount != 0 )

goto PPACK;

++y;

if( --lp_count > 0 )

goto LPACK;

}

OUT :

return;

}

/* display ¿µ¿ªÀ» ¸ðµÎ Áö¿ò */

void decode_black(Flic *flic)

{

int i;

for(i=flic->yoff;i<flic->head.height;i++)

screen_repeat_one(flic->xoff,flic->yoff,0,flic->head.width);

}

/* ¾ÕÃàµÇÁö ¾ÊÀº À̹ÌÁö µ¥ÀÌŸ¸¦ °ð¹Ù·Î È­¸é¿¡ »Ñ·ÁÁÜ

º¸Åë ù¹øÂ° frame ¿¡ »ç¿ëµÇ°í °¡Àå Å©±â°¡ Å­ */

void decode_literal(Uchar *data,Flic *flic)

{

int i;

int height = flic->head.height;

int width = flic->head.width;

int x = flic->xoff;

int y = flic->yoff;

for( i = 0 ; i < height ; ++i ) {

screen_copy_seg( x,y+i,data,width );

data += width;

}

}

/* flic È­ÀÏÀ» open */

int flic_open(Flic *flic,char *name)

{

if((flic->handle=open(name,O_RDONLY | O_BINARY))==-1) return -1;

if(read(flic->handle,&flic->head,sizeof(flic->head))==-1) {

close(flic->handle);

return -1;

}

flic->name=name;

if(flic->head.type==FLC_TYPE) {

lseek(flic->handle,flic->head.oframe1,SEEK_SET);

return 0;

}

if(flic->head.type==FLI_TYPE) {

flic->head.oframe1=sizeof(flic->head);

flic->head.speed=flic->head.speed*1000L/70L;

return 0;

}

close(flic->handle);

return -1;

}

/* ÇϳªÀÇ frame¿¡¼­ °¢ chunk µéÀ» ÆÇ´ÜÇÏ¿© ó¸®ÇÏ´Â ÇÔ¼ö¸¦ È£ÃâÇÔ */

int decode_frame(Flic *flic,FrameHead *frame)

{

int i;

long l,fpos;

ChunkHead chunk;

for( i = 0 ; i < frame->chunks ; i++ ){

fpos=tell(flic->handle);

if(read(flic->handle,&chunk,sizeof(chunk))==-1) return -1;

if(read(flic->handle,FrameBuff,

(unsigned)(chunk.size-sizeof(chunk)))==-1) return -1;

switch( chunk.type ) {

case COLOR_256 :

decode_color_256(FrameBuff);

break;

case DELTA_FLC :

decode_delta_flc(FrameBuff,flic);

break;

case COLOR_64 :

decode_color_64(FrameBuff);

break;

case DELTA_FLI :

decode_delta_fli(FrameBuff,flic);

break;

case BLACK_CLS :

decode_black(flic);

break;

case BYTE_RUN :

decode_byte_run(FrameBuff,flic);

break;

case LITERAL :

decode_literal(FrameBuff,flic);

break;

default :

break;

}

lseek(flic->handle,fpos+chunk.size,SEEK_SET);

}

return 0;

}

/* frame ´ÜÀ§·Î ´ÙÀ½ÀÇ È­¸éÀ» Ãâ·ÂÇØÁÜ */

int flic_next_frame(Flic *flic)

{

int i;

FrameHead head;

long fpos;

fpos=tell(flic->handle);

if(read(flic->handle, &head, sizeof(head))==-1) return -1;

i=decode_frame(flic,&head);

lseek(flic->handle,fpos+head.size,SEEK_SET);

return i;

}

/* system clock À» ÀÐÀ½ - clock tick

return µÇ´Â regs.x.dx ´Â 1 ÃÊ¿¡ ¾à 18.2¾¿ Áõ°¡ÇÏ´Â °ªÀ» °¡Áü */

unsigned get_clock_tick(void)

{

union REGS regs;

regs.x.ax=0;

int86(0x1A,&regs,&regs);

return regs.x.dx;

}

/* flic È­ÀÏÀ» Çѹø¸¸ º¸¿©ÁÜ */

int flic_play_once(char *fname)

{

int i,tick;

unsigned stime,ctime;

if(flic_open(&flic,fname)==-1) return -1;

tick=(int)((flic.head.speed*18L)/1000L);

FrameBuff=(char *)malloc(0xF600);

if(FrameBuff==NULL) {

close(flic.handle);

return -1;

}

for(i=0;i<flic.head.frames;i++) {

stime=get_clock_tick();

if(flic_next_frame(&flic)==-1) {

free(FrameBuff);

close(flic.handle);

return -1;

}

do {

ctime=get_clock_tick();

} while((ctime-stime)<tick);

}

free(FrameBuff);

close(flic.handle);

return 0;

}

/* flic È­ÀÏÀ» Űº¸µå°¡ ´­·ÁÁú¶§±îÁö ¹Ýº¹ÇÏ¿© º¸¿©ÁÜ */

int flic_play_loop(char *fname)

{

int i,tick;

unsigned stime,ctime;

if(flic_open(&flic,fname)==-1) return -1;

tick=(int)((flic.head.speed*18L)/1000L);

lseek(flic.handle,flic.head.oframe1,SEEK_SET);

FrameBuff=(char *)malloc(0xF600);

if(FrameBuff==NULL) {

close(flic.handle);

return -1;

}

stime=get_clock_tick();

if(flic_next_frame(&flic)==-1) {

close(flic.handle);

return -1;

}

tick=(int)((flic.head.speed*18L)/1000L);

if(flic.head.type==FLI_TYPE)

flic.head.oframe2=tell(flic.handle);

do {

ctime=get_clock_tick();

} while((ctime-stime)<tick);

while(1) {

lseek(flic.handle,flic.head.oframe2,SEEK_SET);

for(i=0;i<flic.head.frames;i++) {

stime=get_clock_tick();

if(flic_next_frame(&flic)==-1) {

free(FrameBuff);

close(flic.handle);

return -1;

}

do {

if(kbhit()) {

free(FrameBuff);

close(flic.handle);

return 0;

}

ctime=get_clock_tick();

} while((ctime-stime)<tick);

}

}

// free(FrameBuff);

// close(flic.handle);

// return 0;

}

/* È­¸éÀÇ ¸ðµå¸¦ º¯°æÇÔ */

void set_mode(Uchar mode)

{

union REGS regs;

regs.h.ah=0;

regs.h.al=mode;

int86(0x10,&regs,&regs);

}

void main(int argc,char *argv[])

{

if(argc<2) {

printf("Usage : flic flic_filename\n");

exit(0);

}

set_mode(0x13); /* 320*200 256 color ¸ðµå */

flic_play_once(argv[1]);

set_mode(3); /* text ¸ðµå */

}




11. ±× ¹ÛÀÇ µ¿È­»ó Æ÷¸Ë

11.1 AVI

ÀÎÅÚ »ç¿¡¼­ Á¦¾ÈÇÑ Indeo ±Ô¾à¿¡ µû¸¥ µ¿È­»ó ó¸®¿ë Æ÷¸Ë. º°µµÀÇ ¾ÐÃà Àü¿ë º¸µå ¾øÀ̵µ µ¿È­»óÀ» ±¸ÇöÇÒ ¼ö ÀÖ´Â À©µµ¿ìÁî Ç¥ÁØ Æ÷¸ËÀÌ´Ù. ÃÊ´ç 15 ÇÁ·¹ÀÓÀ» µð½ºÇ÷¹ÀÌ ÇÒ ¼ö ÀÖÀ¸¸ç ±âº» ÇØ»óµµ´Â 300¡¿200. Ç¥Çö °¡´ÉÇÑ »ö»óÀº 256 Ä÷¯ÀÌ´Ù. µû¶ó¼­ ÀÛ°í ¼­Ä£ È­¸é°ú ÇÔ²² »ç¿îµå µ¥ÀÌŸ¿Í µ¿È­»óÀÌ µ¿½Ã¿¡ 󸮵Ǵ °ÍÀÌ ¹ÌÈíÇÏ¿© ¸³½ÌÅ©(LipSync)°¡ ¹ß»ýÇÑ´Ù.

11.2 QTW

¸ÅŲÅä½ÃÀÇ ¿î¿µÃ¼Á¦ÀÎ AppleTalkÀÇ Ç¥ÁØ µ¿È­»ó ó¸® Æ÷¸Ë. ÆÄÀÏ ±Ô¾àÀº ¸¹ÀºÁ¡¿¡¼­ .AVI¿Í °°Àº Á¡ÀÌ ¸¹Àºµ¥ .AVI¿Í ¸¶Âù°¡Áö·Î º°µµÀÇ Àü¿ë º¸µå ¾øÀ̵µ µ¿È­»óÀ» ±¸ÇöÇÒ ¼ö Àֱ⠶§¹®ÀÌ´Ù.

.AVI¿Í ºñ±³ÇÏ¿´À» ¶§ ´Ù¸¥ Á¡Àº ¸³½ÌÅ© Çö»óÀÌ ÀϾ´Â °æ¿ì°¡ Àû°í ÆÄÀÏ ³»ºÎ¿¡ »ç¿îµå Ãâ·Â Á¦¾î ºÎºÐÀÌ Æ÷ÇԵǾî ÀÖ¾î À½·®À» Á¦¾îÇÒ ¼ö ÀÖ´Ù´Â Á¡ÀÌ´Ù. ¾ó¸¶Àü¿¡ 2.0 ¹öÀüÀÌ ¹ßÇ¥µÇ¾ú´Ù.




ùȭ¸éÀ¸·Î À§ÀÇ Â÷¸²À¸·Î À̵¿ ÀÌÀü ¹®¼­ÆÄÀÏ Àб⠵ÚÀÇ ¹®¼­ÆÄÀÏ Àбâ ÀÌ ¹®¼­ÀÇ Ã¹ ÁÙ·Î °¡±â