¤Á¤Ê¤ß¤Ëtiff¥Õ¥¡¥¤¥ëÆÉ¤ß¹þ¤ß¤Î°ì¹©Éס£
¡ÖTIFFOpen(inputfilename, "r")¡×¤ÇÆÉ¤ß¹þ¤à¤Ètiff¤Î¥¿¥°Îΰè¤Ë¤ª¤«¤·¤Êʸ»ú¤¬¤¢¤ë¾ì¹ç¡¢¥¨¥é¡¼¤¬½Ð¤ÆÀè¤Ë¿Ê¤Þ¤Ê¤¯¤Ê¤ë¤³¤È¤¬¤¢¤Ã¤¿¡£ ¥Þ¥Ë¥å¥¢¥ë¤ò¸«¤Æ¤â¡¢ÉÔÌÀ¥¿¥°¤Ï̵»ë¤µ¤ì¤ë¤È¤¤¤¦¤¬¡¢Ìµ»ë¤µ¤ì¤¤ì¤Æ¤Ê¤¤¡£ ÆüËܸì¤Ç¥¿¥°¤ò½ñ¤¤¤Æ¤¤¤ë¤¬¸Î¤Î¥¨¥é¡¼¤«¤Ê¤È¡£ ľ²¼¤Ë¡Öprintf("finished");¡×¤Ê¤É¤È½ñ¤¤¤Æ¤ª¤¯¤È̵»ë¤µ¤ì¤ë¡£ ¡Ö\n¡×¤¬Æþ¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¤¹¤°¤Ë¤Ï²èÌ̤˽ÐÎϤµ¤ì¤Ê¤¤¤¬¡¢¤½¤ì¤Ç¤âÎɤ¤¤é¤·¤¤¡£ °ÕÌ£ÉÔÌÀ¡£ ¡Ä¤È¤¤¤¦µ¤¤¬¤·¤Æ¤¤¤¿¤¬¡¢º£»î¤·¤Æ¤ß¤ë¤È´Ø·¸¤Ê¤«¤Ã¤¿¤ß¤¿¤¤¤À¡£ ¤Ç¤â¡¢¤½¤Î»þ¤Ï¤³¤ì¤ÇÄ̤俤Ȼפ¦¤Î¤Ç¡¢Ê̤Υ¨¥é¡¼¤¬printf¤Ç²óÈò¤Ç¤¤Æ¤¤¤¿¡¢¤Î¤«¤â¤·¤ì¤Ê¤¤¡£ °ì±þ»Ä¤·¤Æ¤ª¤¯¡£
º£¤è¤¯¹Í¤¨¤Æ¤ß¤ë¤È¡¢Â¾¤ÎÉôʬ¤ÏÆÉ¤ß¹þ¤ß¤Î°ÕÌ£¤¬Ê¬¤«¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¤¿¤á¤Ëµ¯¤¤¿¡¢ÉÔɬÍפʹ©ÉפǤ¢¤Ã¤¿¡£ ¤à¤¥¡£ ¤â¤Î¤¹¤´¤¯¥¨¥¥»¥ó¥È¥ê¥Ã¥¯¤Ê¤³¤È¤·¤Æ¤ë¡£ ¤³¤ì¤Çư¤¤¤Æ¤¿¤Î¤Ï´ñÀפÀ¤Ê¡£
ľ¤·¤¿¡£ Á°¥Ú¡¼¥¸»²¾È¡£ stripSize = TIFFStripSize(image); stripMax = TIFFNumberOfStrips(image); TIFFGetField(image, TIFFTAG_BITSPERSAMPLE, &bps); ¤Ç¡¢stripSize¡¢stripMax¡¢bps¤òÆÉ¤ß¹þ¤à¡£ ¥ë¡¼¥×Æâ¤ò²èÁü½ñ¤¹þ¤ß¤ÎÉôʬ¤òÆÉ¤ß¹þ¤ß TIFFReadRawStrip(image, stripCount, buffer+imageOffset, stripSize) ¤Ë¤¹¤ë¡£ ¤¢¤È¤Ï¡¢TIFFGetField(image, TIFFTAG_PHOTOMETRIC, &photo)¤¢¤¿¤ê¤òÆÉ¤ß¹þ¤ó¤Ç¡¢È¿Å¾¤«¤±¤Æ¤ä¤Ã¤¿¤ê¤¹¤ë¡£(¹¥¤ß¤ÎÌäÂê) if(photo == PHOTOMETRIC_MINISWHITE){ printf("Fixing the photometric interpretation\n"); for(count = 0; count < bufferSize; count++){ buffer[count] = ~buffer[count]; } }
ÆÉ¤ß¹þ¤á¤Ê¤¤TAG¤âÃæ¤Ë¤Ï¤¢¤ë¤Î¤Ç¡¢¤½¤ì¤ÏÁ´Éô¤Þ¤È¤â¤ËÀßÄꤷ¤Æ¤Ê¤¤¿Í¤¬°¤¤¤È¤¤¤¦¤³¤È¤Ç¡¢¤¢¤¤é¤á¤Þ¤·¤ç¤¦¡£
¤ª¤Þ¤± ²æ¡¹¤Î¼è¤Ã¤Æ¤¤¿²èÁü¤òŸ³«¤·¤¿¤È¤¤Î¥¨¥é¡¼Ê¸¡£ Ĺ¡¹¤È½Ð¤ÆÀ¶²¡¹¤À¤±¤ì¤É¤â¡¢½ÐÎϲèÌ̤ÎÈþ¤·¤µ¤òÃø¤·¤¯Ç˲õ¤¹¤ë°Ê³°Ìµ³²¤Ç¤¹¡£ ¤¿¤À¡¢¾å½Ò¤Ë¤â¤¢¤ë¤è¤¦¤Ë¤Û¤«¤Î¥¨¥é¡¼¤È¶¥¹ç¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¤Î¤Ç¡¢Ãí°Õ¤·¤Þ¤·¤ç¤¦¡£ ----------- TIFFReadDirectory: Warning, Unknown field with tag 36864 (0x9000) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36865 (0x9001) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36866 (0x9002) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36867 (0x9003) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36868 (0x9004) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36870 (0x9006) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36876 (0x900c) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36877 (0x900d) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36878 (0x900e) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36879 (0x900f) encountered. TIFFReadDirectory: Warning, Unknown field with tag 36880 (0x9010) encountered. TIFFReadDirectory: Warning, Unknown field with tag 37120 (0x9100) encountered. TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. TIFFFetchNormalTag: Warning, ASCII value for tag "Model" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
|
|
|