亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tif_pdsdirread.c

?? tiff格式傳真源碼例子
?? C
?? 第 1 頁 / 共 3 頁
字號:
			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (uint16), mesg);			ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp);			break;		case TIFF_SHORT:		case TIFF_SSHORT:			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (uint16), mesg);			ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp);			break;		case TIFF_LONG:		case TIFF_SLONG:			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (uint32), mesg);			ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp);			break;		case TIFF_RATIONAL:		case TIFF_SRATIONAL:			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (float), mesg);			ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp);			break;		case TIFF_FLOAT:			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (float), mesg);			ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp);			break;		case TIFF_DOUBLE:			cp = CheckMalloc(tif,			    dp->tdir_count * sizeof (double), mesg);			ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp);			break;		case TIFF_ASCII:		case TIFF_UNDEFINED:		/* bit of a cheat... */			/*			 * Some vendors write strings w/o the trailing			 * NULL byte, so always append one just in case.			 */			cp = CheckMalloc(tif, dp->tdir_count+1, mesg);			if (ok = (cp && TIFFFetchString(tif, dp, cp)))				cp[dp->tdir_count] = '\0';	/* XXX */			break;		}		if (ok) {			ok = (fip->field_passcount ?			    (*setFieldFn)(tif, dp->tdir_tag, dp->tdir_count, cp)			  : (*setFieldFn)(tif, dp->tdir_tag, cp));		}		if (cp != NULL)			_TIFFfree(cp);	} else if (CheckDirCount(tif, dp, 1)) {	/* singleton value */		switch (dp->tdir_type) {		case TIFF_BYTE:		case TIFF_SBYTE:		case TIFF_SHORT:		case TIFF_SSHORT:			/*			 * If the tag is also acceptable as a LONG or SLONG			 * then (*setFieldFn) will expect an uint32 parameter			 * passed to it (through varargs).  Thus, for machines			 * where sizeof (int) != sizeof (uint32) we must do			 * a careful check here.  It's hard to say if this			 * is worth optimizing.			 *			 * NB: We use TIFFFieldWithTag here knowing that			 *     it returns us the first entry in the table			 *     for the tag and that that entry is for the			 *     widest potential data type the tag may have.			 */			{ TIFFDataType type = fip->field_type;			  if (type != TIFF_LONG && type != TIFF_SLONG) {				uint16 v = (uint16)			   TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);				ok = (fip->field_passcount ?				    (*setFieldFn)(tif, dp->tdir_tag, 1, &v)				  : (*setFieldFn)(tif, dp->tdir_tag, v));				break;			  }			}			/* fall thru... */		case TIFF_LONG:		case TIFF_SLONG:			{ uint32 v32 =		    TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);			  ok = (fip->field_passcount ? 			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v32)			    : (*setFieldFn)(tif, dp->tdir_tag, v32));			}			break;		case TIFF_RATIONAL:		case TIFF_SRATIONAL:		case TIFF_FLOAT:			{ float v = (dp->tdir_type == TIFF_FLOAT ? 			      TIFFFetchFloat(tif, dp)			    : TIFFFetchRational(tif, dp));			  ok = (fip->field_passcount ?			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v)			    : (*setFieldFn)(tif, dp->tdir_tag, v));			}			break;		case TIFF_DOUBLE:			{ double v;			  ok = (TIFFFetchDoubleArray(tif, dp, &v) &&			    (fip->field_passcount ?			      (*setFieldFn)(tif, dp->tdir_tag, 1, &v)			    : (*setFieldFn)(tif, dp->tdir_tag, v))			  );			}			break;		case TIFF_ASCII:		case TIFF_UNDEFINED:		/* bit of a cheat... */			{ char c[2];			  if (ok = (TIFFFetchString(tif, dp, c) != 0)) {				c[1] = '\0';		/* XXX paranoid */				ok = (*setFieldFn)(tif, dp->tdir_tag, c);			  }			}			break;		}	}	return (ok);}/* Everything after this is exactly duplicated from the standard tif_dirread.c   file, necessitated by the fact that they are declared static there so   we can't call them!*/#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))/* * Fetch samples/pixel short values for  * the specified tag and verify that * all values are the same. */static intTIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl){	int samples = tif->tif_dir.td_samplesperpixel;	int status = 0;	if (CheckDirCount(tif, dir, (uint32) samples)) {		uint16 buf[10];		uint16* v = buf;		if (samples > NITEMS(buf))			v = (uint16*) _TIFFmalloc(samples * sizeof (uint16));		if (TIFFFetchShortArray(tif, dir, v)) {			int i;			for (i = 1; i < samples; i++)				if (v[i] != v[0]) {					TIFFError(tif->tif_name,		"Cannot handle different per-sample values for field \"%s\"",			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);					goto bad;				}			*pl = v[0];			status = 1;		}	bad:		if (v != buf)			_TIFFfree((char*) v);	}	return (status);}/* * Fetch samples/pixel ANY values for  * the specified tag and verify that * all values are the same. */static intTIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl){	int samples = (int) tif->tif_dir.td_samplesperpixel;	int status = 0;	if (CheckDirCount(tif, dir, (uint32) samples)) {		double buf[10];		double* v = buf;		if (samples > NITEMS(buf))			v = (double*) _TIFFmalloc(samples * sizeof (double));		if (TIFFFetchAnyArray(tif, dir, v)) {			int i;			for (i = 1; i < samples; i++)				if (v[i] != v[0]) {					TIFFError(tif->tif_name,		"Cannot handle different per-sample values for field \"%s\"",			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);					goto bad;				}			*pl = v[0];			status = 1;		}	bad:		if (v != buf)			_TIFFfree(v);	}	return (status);}#undef NITEMS/* * Fetch a set of offsets or lengths. * While this routine says "strips", * in fact it's also used for tiles. */static intTIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp){	register uint32* lp;	int status;	if (!CheckDirCount(tif, dir, (uint32) nstrips))		return (0);	/*	 * Allocate space for strip information.	 */	if (*lpp == NULL &&	    (*lpp = (uint32 *)CheckMalloc(tif,	      nstrips * sizeof (uint32), "for strip array")) == NULL)		return (0);	lp = *lpp;	if (dir->tdir_type == (int)TIFF_SHORT) {		/*		 * Handle uint16->uint32 expansion.		 */		uint16* dp = (uint16*) CheckMalloc(tif,		    dir->tdir_count* sizeof (uint16), "to fetch strip tag");		if (dp == NULL)			return (0);		if (status = TIFFFetchShortArray(tif, dir, dp)) {			register uint16* wp = dp;			while (nstrips-- > 0)				*lp++ = *wp++;		}		_TIFFfree((char*) dp);	} else		status = TIFFFetchLongArray(tif, dir, lp);	return (status);}#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))/* * Fetch and set the ExtraSamples tag. */static intTIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir){	uint16 buf[10];	uint16* v = buf;	int status;	if (dir->tdir_count > NITEMS(buf))		v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16));	if (dir->tdir_type == TIFF_BYTE)		status = TIFFFetchByteArray(tif, dir, v);	else		status = TIFFFetchShortArray(tif, dir, v);	if (status)		status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v);	if (v != buf)		_TIFFfree((char*) v);	return (status);}#undef NITEMS#ifdef COLORIMETRY_SUPPORT/* * Fetch and set the RefBlackWhite tag. */static intTIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir){	static char mesg[] = "for \"ReferenceBlackWhite\" array";	char* cp;	int ok;	if (dir->tdir_type == TIFF_RATIONAL)		return (1/*TIFFFetchNormalTag(tif, dir) just so linker won't complain - this part of the code is never used anyway */);	/*	 * Handle LONG's for backward compatibility.	 */	cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg);	if (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) {		float* fp = (float*)		    CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg);		if (ok = (fp != NULL)) {			uint32 i;			for (i = 0; i < dir->tdir_count; i++)				fp[i] = (float)((uint32*) cp)[i];			ok = TIFFSetField(tif, dir->tdir_tag, fp);			_TIFFfree((char*) fp);		}	}	if (cp)		_TIFFfree(cp);	return (ok);}#endif#if STRIPCHOP_SUPPORT/* * Replace a single strip (tile) of uncompressed data by * multiple strips (tiles), each approximately 8Kbytes. * This is useful for dealing with large images or * for dealing with machines with a limited amount * memory. */static voidChopUpSingleUncompressedStrip(TIFF* tif){	register TIFFDirectory *td = &tif->tif_dir;	uint32 bytecount = td->td_stripbytecount[0];	uint32 offset = td->td_stripoffset[0];	tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes;	tstrip_t strip, nstrips, rowsperstrip;	uint32* newcounts;	uint32* newoffsets;	/*	 * Make the rows hold at least one	 * scanline, but fill 8k if possible.	 */	if (rowbytes > 8192) {		stripbytes = rowbytes;		rowsperstrip = 1;	} else {		rowsperstrip = 8192 / rowbytes;		stripbytes = rowbytes * rowsperstrip;	}	/* never increase the number of strips in an image */	if (rowsperstrip >= td->td_rowsperstrip)		return;	nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes);	newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),				"for chopped \"StripByteCounts\" array");	newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),				"for chopped \"StripOffsets\" array");	if (newcounts == NULL || newoffsets == NULL) {	        /*		 * Unable to allocate new strip information, give		 * up and use the original one strip information.		 */		if (newcounts != NULL)			_TIFFfree(newcounts);		if (newoffsets != NULL)			_TIFFfree(newoffsets);		return;	}	/*	 * Fill the strip information arrays with	 * new bytecounts and offsets that reflect	 * the broken-up format.	 */	for (strip = 0; strip < nstrips; strip++) {		if (stripbytes > bytecount)			stripbytes = bytecount;		newcounts[strip] = stripbytes;		newoffsets[strip] = offset;		offset += stripbytes;		bytecount -= stripbytes;	}	/*	 * Replace old single strip info with multi-strip info.	 */	td->td_stripsperimage = td->td_nstrips = nstrips;	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);	_TIFFfree(td->td_stripbytecount);	_TIFFfree(td->td_stripoffset);	td->td_stripbytecount = newcounts;	td->td_stripoffset = newoffsets;}#endif /* STRIPCHOP_SUPPORT */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二| 久久综合九色综合97婷婷女人| 国产午夜精品一区二区三区嫩草| 亚洲二区视频在线| 成人精品国产福利| 精品久久久三级丝袜| 日韩电影在线免费看| 在线看国产一区| 国产精品嫩草影院av蜜臀| 久久精品久久久精品美女| 欧美三级三级三级| 亚洲欧美色图小说| 99精品视频在线观看| 国产视频不卡一区| 国产揄拍国内精品对白| 日韩一级免费观看| 五月婷婷激情综合网| 91久久精品国产91性色tv| 国产精品久久网站| 国产不卡视频一区二区三区| 日韩免费观看2025年上映的电影 | 国产精品正在播放| 91成人在线精品| 国产精品传媒入口麻豆| 精品综合免费视频观看| 91.xcao| 亚洲午夜在线电影| 欧洲激情一区二区| 亚洲综合色成人| 欧美调教femdomvk| 一区二区三区四区av| 色婷婷亚洲一区二区三区| 中文字幕综合网| 91麻豆高清视频| 亚洲黄色小视频| 欧美—级在线免费片| 国产成人精品免费视频网站| 久久久午夜电影| 国产91对白在线观看九色| 欧美韩国日本不卡| 成人福利视频网站| 成人欧美一区二区三区1314| 91亚洲大成网污www| 亚洲精品国产精品乱码不99| 色婷婷亚洲一区二区三区| 亚洲男女毛片无遮挡| 色婷婷激情一区二区三区| 亚洲欧美激情小说另类| 欧美最猛黑人xxxxx猛交| 午夜免费久久看| 91精品国产欧美日韩| 久久精品国产一区二区| 精品999久久久| 丁香婷婷综合激情五月色| 国产精品久久久久久久久果冻传媒| gogogo免费视频观看亚洲一| 中文字幕中文字幕在线一区| 一本大道久久a久久精品综合| 亚洲一区二区偷拍精品| 91精品国产91综合久久蜜臀| 免费久久99精品国产| 久久久精品中文字幕麻豆发布| 成人黄色在线看| 亚洲综合一二三区| 这里只有精品电影| 黄色精品一二区| 国产精品美女久久久久高潮| 一本一道综合狠狠老| 天堂av在线一区| 国产亚洲自拍一区| 91麻豆免费看片| 欧美aaa在线| 国产欧美一二三区| 在线观看视频一区二区欧美日韩| 爽好多水快深点欧美视频| 亚洲精品在线观看视频| av综合在线播放| 欧美a级一区二区| 国产精品免费av| 91精品免费在线| 福利一区二区在线| 婷婷中文字幕综合| 国产午夜精品理论片a级大结局| 在线免费观看日韩欧美| 黄色成人免费在线| 尤物av一区二区| 欧美精品一区二| 在线亚洲人成电影网站色www| 另类综合日韩欧美亚洲| 国产精品久久777777| 国产精品欧美一区二区三区| 中文字幕av一区二区三区高| 色婷婷久久综合| 麻豆久久一区二区| 亚洲精品亚洲人成人网| 日韩免费视频一区| 欧洲国内综合视频| 国产91色综合久久免费分享| 偷拍一区二区三区| √…a在线天堂一区| 日韩欧美国产午夜精品| 色国产综合视频| 国产精品77777竹菊影视小说| 亚洲午夜久久久久久久久久久 | 成人国产电影网| 日韩va欧美va亚洲va久久| 国产精品久久久久久久久免费相片 | 亚洲国产精品久久艾草纯爱| 国产午夜精品美女毛片视频| 7777精品伊人久久久大香线蕉的 | 成人网页在线观看| 日本欧美久久久久免费播放网| 国产精品成人一区二区艾草 | 欧美日韩精品一区二区在线播放| 国产99久久久国产精品潘金| 免费黄网站欧美| 激情亚洲综合在线| 911精品产国品一二三产区| 国产91丝袜在线播放0| 喷水一区二区三区| 欧美视频中文字幕| 亚洲午夜影视影院在线观看| 国产精品美女一区二区在线观看| 日韩欧美一区二区久久婷婷| 欧美日韩一本到| 91热门视频在线观看| 丁香激情综合五月| 精品亚洲成a人| 免费在线观看日韩欧美| 午夜伦欧美伦电影理论片| 夜色激情一区二区| 亚洲三级在线看| 国产精品久久久久久久久久免费看 | 亚洲国产cao| 亚洲日本在线天堂| 一区精品在线播放| 国产免费成人在线视频| 久久一区二区视频| 日韩欧美在线影院| 91麻豆精品国产91| 欧美高清激情brazzers| 欧美日精品一区视频| 欧美在线你懂的| 在线影视一区二区三区| 日本韩国精品一区二区在线观看| 99久久免费精品| 91影院在线免费观看| 99riav久久精品riav| av亚洲产国偷v产偷v自拍| av毛片久久久久**hd| 成人免费视频视频| 亚洲不卡av一区二区三区| 国产日韩欧美综合一区| 精品久久五月天| 精品成人免费观看| 国产亚洲女人久久久久毛片| 久久久综合视频| 国产欧美日韩三级| 亚洲国产高清aⅴ视频| 国产精品伦理在线| 亚洲婷婷在线视频| 亚洲女女做受ⅹxx高潮| 亚洲麻豆国产自偷在线| 亚洲黄色小视频| 成人app软件下载大全免费| 天堂影院一区二区| 久久影音资源网| 精品1区2区在线观看| 亚洲一区影音先锋| 中文字幕亚洲精品在线观看 | 精品日韩成人av| 777亚洲妇女| 日本一区二区三区高清不卡| 久久精品一区八戒影视| 欧美国产亚洲另类动漫| 国产精品麻豆久久久| 久久精品夜色噜噜亚洲a∨| 日韩欧美在线网站| 久久久午夜精品| 国产精品国产三级国产aⅴ无密码| 国产精品成人午夜| 亚洲一区二区视频在线| 日韩电影在线免费观看| 国产精品系列在线观看| 色综合欧美在线| 91.成人天堂一区| 久久精品一区二区三区av| 亚洲精品欧美二区三区中文字幕| 亚洲电影第三页| 国产老女人精品毛片久久| 99精品黄色片免费大全| 欧美人妇做爰xxxⅹ性高电影| 欧美mv日韩mv| 国产精品国产a级| 天天综合天天综合色| 国产精品18久久久久久vr| 色综合激情五月| 精品少妇一区二区| 亚洲精品一二三| 国内欧美视频一区二区|