1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

bigtiff images reading

This commit is contained in:
Suleyman TURKMEN
2022-01-15 04:43:20 +03:00
parent 60228d30d1
commit f1857030b5
2 changed files with 28 additions and 1 deletions
+5 -1
View File
@@ -112,6 +112,8 @@ static bool cv_tiffSetErrorHandler()
static const char fmtSignTiffII[] = "II\x2a\x00";
static const char fmtSignTiffMM[] = "MM\x00\x2a";
static const char fmtSignBigTiffII[] = "II\x2b\x00";
static const char fmtSignBigTiffMM[] = "MM\x00\x2b";
TiffDecoder::TiffDecoder()
{
@@ -140,7 +142,9 @@ bool TiffDecoder::checkSignature( const String& signature ) const
{
return signature.size() >= 4 &&
(memcmp(signature.c_str(), fmtSignTiffII, 4) == 0 ||
memcmp(signature.c_str(), fmtSignTiffMM, 4) == 0);
memcmp(signature.c_str(), fmtSignTiffMM, 4) == 0 ||
memcmp(signature.c_str(), fmtSignBigTiffII, 4) == 0 ||
memcmp(signature.c_str(), fmtSignBigTiffMM, 4) == 0);
}
int TiffDecoder::normalizeChannelsNumber(int channels) const