MCPcopy Create free account
hub / github.com/OSGeo/PROJ / IsTIFF

Function IsTIFF

src/grids.cpp:377–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375// ---------------------------------------------------------------------------
376
377static bool IsTIFF(size_t header_size, const unsigned char *header) {
378 // Test combinations of signature for ClassicTIFF/BigTIFF little/big endian
379 return header_size >= 4 && (((header[0] == 'I' && header[1] == 'I') ||
380 (header[0] == 'M' && header[1] == 'M')) &&
381 ((header[2] == 0x2A && header[3] == 0) ||
382 (header[3] == 0x2A && header[2] == 0) ||
383 (header[2] == 0x2B && header[3] == 0) ||
384 (header[3] == 0x2B && header[2] == 0)));
385}
386
387#ifdef TIFF_ENABLED
388

Callers 1

openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected