repo.or.cz
/
GPXSee.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Code cleanup
[GPXSee.git]
/
src
/
map
/
tifffile.cpp
blob
232295ae6fc69b57b8222bd50c10b91501d99d53
1
#include
"tifffile.h"
2
3
#define TIFF_II 0x4949
4
#define TIFF_MM 0x4D4D
5
#define TIFF_MAGIC 42
6
7
bool
TIFFFile
::
readHeader
(
quint32
&
ifd
)
8
{
9
quint16 endian
,
magic
;
10
11
if
(
QFile
::
read
((
char
*)&
endian
,
sizeof
(
endian
)) < (
qint64
)
sizeof
(
endian
))
12
return false
;
13
if
(
endian
==
TIFF_II
)
14
_be
=
false
;
15
else if
(
endian
==
TIFF_MM
)
16
_be
=
true
;
17
else
18
return false
;
19
20
if
(!
readValue
(
magic
))
21
return false
;
22
if
(
magic
!=
TIFF_MAGIC
)
23
return false
;
24
if
(!
readValue
(
ifd
))
25
return false
;
26
27
return true
;
28
}