Subversion Repositories Kolibri OS

Rev

Rev 2992 | Go to most recent revision | Details | Compare with Previous | 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
 
3499 dunkaist 26
 
2388 dunkaist 27
struct tiff_extra
28
	image_width			rd	1	; SHORT or LONG
29
	image_height			rd	1	; SHORT or LONG
30
	bits_per_sample			rd	1	; SHORT
31
	samples_per_pixel		rd	1	; SHORT
32
	compression			rd	1	; SHORT
33
	photometric			rd	1	; SHORT
34
	offsets_number			rd	1
35
	strip_offsets			rd	1	; SHORT or LONG
36
	strip_offsets_length		rd	1
37
	rows_per_strip			rd	1	; SHORT or LONG
38
	strip_byte_counts		rd	1	; LONG or SHORT
39
	strip_byte_counts_length	rd	1
40
	palette				rd	1	; SHORT
41
	palette_size			rd	1	; in colors, not samples
3499 dunkaist 42
        planar_configuration            rd      1       ; SHORT
2733 dunkaist 43
	extra_samples			rd	1	; pointer to array of SHORTs
44
	extra_samples_number		rd	1
2992 dunkaist 45
	predictor			rd	1	; SHORT
2388 dunkaist 46
ends
47
 
48
 
49
TIFF.IFDE_TYPE.BYTE		=	1
50
TIFF.IFDE_TYPE.ASCII		=	2
51
TIFF.IFDE_TYPE.SHORT		=	3
52
TIFF.IFDE_TYPE.LONG		=	4
53
TIFF.IFDE_TYPE.RATIONAL		=	5
54
TIFF.IFDE_TYPE.SBYTE		=	6
55
TIFF.IFDE_TYPE.UNDEFINED	=	7
56
TIFF.IFDE_TYPE.SSHORT		=	8
57
TIFF.IFDE_TYPE.SLONG		=	9
58
TIFF.IFDE_TYPE.SRATIONAL	=	10
59
TIFF.IFDE_TYPE.FLOAT		=	11
60
TIFF.IFDE_TYPE.DOUBLE		=	12
61
 
62
TIFF.IFDE_TYPE_LENGTH.BYTE	=	1
63
TIFF.IFDE_TYPE_LENGTH.ASCII	=	1
64
TIFF.IFDE_TYPE_LENGTH.SHORT	=	2
65
TIFF.IFDE_TYPE_LENGTH.LONG	=	4
66
TIFF.IFDE_TYPE_LENGTH.RATIONAL	=	8
67
TIFF.IFDE_TYPE_LENGTH.SBYTE	=	1
68
TIFF.IFDE_TYPE_LENGTH.UNDEFINED	=	1
69
TIFF.IFDE_TYPE_LENGTH.SSHORT	=	2
70
TIFF.IFDE_TYPE_LENGTH.SLONG	=	4
71
TIFF.IFDE_TYPE_LENGTH.SRATIONAL	=	8
72
TIFF.IFDE_TYPE_LENGTH.FLOAT	=	4
73
TIFF.IFDE_TYPE_LENGTH.DOUBLE	=	8
74
 
75
TIFF.COMPRESSION.UNCOMPRESSED	=	1
76
TIFF.COMPRESSION.CCITT1D	=	2
77
TIFF.COMPRESSION.GROUP3FAX	=	3
78
TIFF.COMPRESSION.GROUP4FAX	=	4
79
TIFF.COMPRESSION.LZW		=	5
80
TIFF.COMPRESSION.JPEG		=	6
81
TIFF.COMPRESSION.PACKBITS	=	32773
82
 
83
TIFF.PHOTOMETRIC.WHITE_IS_ZERO	=	0
84
TIFF.PHOTOMETRIC.BLACK_IS_ZERO	=	1
85
TIFF.PHOTOMETRIC.RGB		=	2
86
TIFF.PHOTOMETRIC.RGB_PALETTE	=	3
87
TIFF.PHOTOMETRIC.MASK		=	4
88
TIFF.PHOTOMETRIC.CMYK		=	5
89
TIFF.PHOTOMETRIC.YCbCr		=	6
90
TIFF.PHOTOMETRIC.CIELAB		=	8
91
 
3499 dunkaist 92
TIFF.PLANAR.CHUNKY              =       1
93
TIFF.PLANAR.PLANAR              =       2
2388 dunkaist 94
 
3499 dunkaist 95
 
2388 dunkaist 96
macro	lodsw_
97
{
98
	stdcall	tiff._.get_word, [_endianness]
99
}
100
 
101
macro	lodsd_
102
{
103
	stdcall	tiff._.get_dword, [_endianness]
104
}
105