コード例 #1
0
ファイル: il_jpeg.c プロジェクト: xksteven/myOpenGL
// Internal function to get the header and check it.
ILboolean iIsValidJpeg()
{
	ILubyte Head[2];

	iGetJpgHead(Head);
	iseek(-2, IL_SEEK_CUR);  // Go ahead and restore to previous state

	return iCheckJpg(Head);
}
コード例 #2
0
ファイル: il_jpeg.cpp プロジェクト: zapolnov/libraries
// Internal function to get the header and check it.
ILboolean iIsValidJpeg(SIO* io)
{
	ILubyte Head[2];

	auto read = iGetJpgHead(io, Head);
	io->seek(io, -read, IL_SEEK_CUR);  // Go ahead and restore to previous state

	if (read == 2)
		return iCheckJpg(Head);
	else
		return IL_FALSE;
}