Subversion Repositories Kolibri OS

Rev

Rev 2733 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2388 dunkaist 1
;;================================================================================================;;
2
;;//// tiff.inc //// (c) dunkaist, 2011-2012 /////////////////////////////////////////////////////;;
3
;;================================================================================================;;
4
;;                                                                                                ;;
5
;; This file is part of Common development libraries (Libs-Dev).                                  ;;
6
;;                                                                                                ;;
7
;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
8
;; Lesser General Public License as published by the Free Software Foundation, either version 2.1 ;;
9
;; of the License, or (at your option) any later version.                                         ;;
10
;;                                                                                                ;;
11
;; Libs-Dev is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  ;;
12
;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  ;;
13
;; Lesser General Public License for more details.                                                ;;
14
;;                                                                                                ;;
15
;; You should have received a copy of the GNU Lesser General Public License along with Libs-Dev.  ;;
16
;; If not, see .                                                    ;;
17
;;                                                                                                ;;
18
;;================================================================================================;;
19
 
20
struct tiff_header
21
	magic_1			rw	1
22
	magic_2			rw	1
23
	first_IFD		rd	1
24
ends
25
 
26
struct tiff_extra
27
	image_width			rd	1	; SHORT or LONG
28
	image_height			rd	1	; SHORT or LONG
29
	bits_per_sample			rd	1	; SHORT
30
	samples_per_pixel		rd	1	; SHORT
31
	compression			rd	1	; SHORT
32
	photometric			rd	1	; SHORT
33
	offsets_number			rd	1
34
	strip_offsets			rd	1	; SHORT or LONG
35
	strip_offsets_length		rd	1
36
	rows_per_strip			rd	1	; SHORT or LONG
37
	strip_byte_counts		rd	1	; LONG or SHORT
38
	strip_byte_counts_length	rd	1
39
	palette				rd	1	; SHORT
40
	palette_size			rd	1	; in colors, not samples
41
ends
42
 
43
 
44
TIFF.IFDE_TYPE.BYTE		=	1
45
TIFF.IFDE_TYPE.ASCII		=	2
46
TIFF.IFDE_TYPE.SHORT		=	3
47
TIFF.IFDE_TYPE.LONG		=	4
48
TIFF.IFDE_TYPE.RATIONAL		=	5
49
TIFF.IFDE_TYPE.SBYTE		=	6
50
TIFF.IFDE_TYPE.UNDEFINED	=	7
51
TIFF.IFDE_TYPE.SSHORT		=	8
52
TIFF.IFDE_TYPE.SLONG		=	9
53
TIFF.IFDE_TYPE.SRATIONAL	=	10
54
TIFF.IFDE_TYPE.FLOAT		=	11
55
TIFF.IFDE_TYPE.DOUBLE		=	12
56
 
57
TIFF.IFDE_TYPE_LENGTH.BYTE	=	1
58
TIFF.IFDE_TYPE_LENGTH.ASCII	=	1
59
TIFF.IFDE_TYPE_LENGTH.SHORT	=	2
60
TIFF.IFDE_TYPE_LENGTH.LONG	=	4
61
TIFF.IFDE_TYPE_LENGTH.RATIONAL	=	8
62
TIFF.IFDE_TYPE_LENGTH.SBYTE	=	1
63
TIFF.IFDE_TYPE_LENGTH.UNDEFINED	=	1
64
TIFF.IFDE_TYPE_LENGTH.SSHORT	=	2
65
TIFF.IFDE_TYPE_LENGTH.SLONG	=	4
66
TIFF.IFDE_TYPE_LENGTH.SRATIONAL	=	8
67
TIFF.IFDE_TYPE_LENGTH.FLOAT	=	4
68
TIFF.IFDE_TYPE_LENGTH.DOUBLE	=	8
69
 
70
TIFF.COMPRESSION.UNCOMPRESSED	=	1
71
TIFF.COMPRESSION.CCITT1D	=	2
72
TIFF.COMPRESSION.GROUP3FAX	=	3
73
TIFF.COMPRESSION.GROUP4FAX	=	4
74
TIFF.COMPRESSION.LZW		=	5
75
TIFF.COMPRESSION.JPEG		=	6
76
TIFF.COMPRESSION.PACKBITS	=	32773
77
 
78
TIFF.PHOTOMETRIC.WHITE_IS_ZERO	=	0
79
TIFF.PHOTOMETRIC.BLACK_IS_ZERO	=	1
80
TIFF.PHOTOMETRIC.RGB		=	2
81
TIFF.PHOTOMETRIC.RGB_PALETTE	=	3
82
TIFF.PHOTOMETRIC.MASK		=	4
83
TIFF.PHOTOMETRIC.CMYK		=	5
84
TIFF.PHOTOMETRIC.YCbCr		=	6
85
TIFF.PHOTOMETRIC.CIELAB		=	8
86
 
87
 
88
macro	lodsw_
89
{
90
	stdcall	tiff._.get_word, [_endianness]
91
}
92
 
93
macro	lodsd_
94
{
95
	stdcall	tiff._.get_dword, [_endianness]
96
}
97