Rev 5007 | Rev 5009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4994 | IgorA | 1 | format MS COFF |
2 | public EXPORTS |
||
3 | section '.flat' code readable align 16 |
||
4 | |||
5 | include '../../../../macros.inc' |
||
6 | include '../../../../proc32.inc' |
||
7 | |||
8 | |||
9 | |||
10 | ;--------- |
||
5008 | IgorA | 11 | offs_m_or_i equ 8 ;смещение параметра 'MM' или 'II' (Motorola, Intel) |
12 | offs_id_gr equ 10 ;смещение id group |
||
13 | offs_tag_0 equ 2 ;смещение 0-го тега |
||
4994 | IgorA | 14 | tag_size equ 12 ;размер структуры тега |
15 | ;форматы данных |
||
16 | tag_format_ui1b equ 1 ;unsigned integer 1 byte |
||
17 | tag_format_text equ 2 ;ascii string |
||
18 | tag_format_ui2b equ 3 ;unsigned integer 2 byte |
||
19 | tag_format_ui4b equ 4 ;unsigned integer 4 byte |
||
4995 | IgorA | 20 | tag_format_urb equ 5 ;unsigned integer 4/4 byte |
4994 | IgorA | 21 | tag_format_si1b equ 6 ;signed integer 1 byte |
22 | tag_format_undef equ 7 ;undefined |
||
23 | tag_format_si2b equ 8 ;signed integer 2 byte |
||
24 | tag_format_si4b equ 9 ;signed integer 4 byte |
||
4995 | IgorA | 25 | tag_format_srb equ 10 ;signed integer 4/4 byte |
4994 | IgorA | 26 | tag_format_f4b equ 11 ;float 4 byte |
27 | tag_format_f8b equ 12 ;float 8 byte |
||
28 | |||
29 | align 4 |
||
30 | txt_dp db ': ',0 |
||
4995 | IgorA | 31 | txt_div db '/',0 |
4994 | IgorA | 32 | |
33 | ; |
||
34 | align 4 |
||
35 | exif_tag_numbers: |
||
5008 | IgorA | 36 | dd 0, gr_0 |
37 | dd 0x8769, gr_8769 ;Exif offset |
||
38 | dd 0xa005, gr_a005 ;Interop offset |
||
39 | dd 0x8825, gr_8825 ;GPS info |
||
40 | .end: |
||
4994 | IgorA | 41 | |
5008 | IgorA | 42 | align 4 |
43 | gr_0: |
||
5002 | IgorA | 44 | db 0x00,0x0b,'Processing software',0 |
45 | db 0x00,0xfe,'Subfile type',0 |
||
46 | db 0x00,0xff,'OldSubfile type',0 |
||
47 | db 0x01,0x00,'Image width',0 |
||
48 | db 0x01,0x01,'Image height',0 |
||
49 | db 0x01,0x02,'Bits per sample',0 |
||
50 | db 0x01,0x03,'Compression',0 |
||
51 | db 0x01,0x06,'Photometric interpretation',0 |
||
52 | db 0x01,0x07,'Thresholding',0 |
||
53 | db 0x01,0x08,'Cell width',0 |
||
54 | db 0x01,0x09,'Cell length',0 |
||
55 | db 0x01,0x0a,'Fill order',0 |
||
56 | db 0x01,0x0d,'Document name',0 |
||
4994 | IgorA | 57 | db 0x01,0x0e,'Image description',0 |
58 | db 0x01,0x0f,'Manufacturer of digicam',0 |
||
59 | db 0x01,0x10,'Model',0 |
||
5002 | IgorA | 60 | db 0x01,0x11,'Strip offsets',0 |
4994 | IgorA | 61 | db 0x01,0x12,'Orientation',0 |
5002 | IgorA | 62 | db 0x01,0x15,'Samples per pixel',0 |
63 | db 0x01,0x16,'Rows per strip',0 |
||
64 | db 0x01,0x17,'Strip byte counts',0 |
||
65 | db 0x01,0x18,'Min sample value',0 |
||
66 | db 0x01,0x19,'Max sample value',0 |
||
4994 | IgorA | 67 | db 0x01,0x1a,'X resolution',0 |
68 | db 0x01,0x1b,'Y resolution',0 |
||
5002 | IgorA | 69 | db 0x01,0x1c,'Planar configuration',0 |
70 | db 0x01,0x1d,'Page name',0 |
||
71 | db 0x01,0x1e,'X position',0 |
||
72 | db 0x01,0x1f,'Y position',0 |
||
73 | db 0x01,0x20,'Free offsets',0 |
||
74 | db 0x01,0x21,'Free byte counts',0 |
||
75 | db 0x01,0x22,'Gray response unit',0 |
||
76 | db 0x01,0x23,'Gray response curve',0 |
||
77 | db 0x01,0x24,'T4 options',0 |
||
78 | db 0x01,0x25,'T6 options',0 |
||
4994 | IgorA | 79 | db 0x01,0x28,'Resolution unit',0 |
5002 | IgorA | 80 | db 0x01,0x29,'Page number',0 |
81 | db 0x01,0x2c,'Color response unit',0 |
||
82 | db 0x01,0x2d,'Transfer function',0 |
||
4994 | IgorA | 83 | db 0x01,0x31,'Software',0 |
5002 | IgorA | 84 | db 0x01,0x32,'Modify date',0 |
85 | db 0x01,0x3b,'Artist',0 |
||
86 | db 0x01,0x3c,'Host computer',0 |
||
87 | db 0x01,0x3d,'Predictor',0 |
||
4994 | IgorA | 88 | db 0x01,0x3e,'White point',0 |
89 | db 0x01,0x3f,'Primary chromaticities',0 |
||
5002 | IgorA | 90 | db 0x01,0x40,'Color map',0 |
91 | db 0x01,0x41,'Halftone hints',0 |
||
92 | db 0x01,0x42,'Tile width',0 |
||
93 | db 0x01,0x43,'Tile length',0 |
||
94 | db 0x01,0x44,'Tile offsets',0 |
||
95 | db 0x01,0x45,'Tile byte counts',0 |
||
96 | db 0x01,0x46,'Bad fax lines',0 |
||
97 | db 0x01,0x47,'Clean fax data',0 |
||
98 | db 0x01,0x48,'Consecutive bad fax lines',0 |
||
99 | db 0x01,0x4a,'Sub IFDs',0 |
||
100 | db 0x01,0x4c,'Ink set',0 |
||
101 | db 0x01,0x4d,'Ink names',0 |
||
102 | db 0x01,0x4e,'Numberof inks',0 |
||
103 | db 0x01,0x50,'Dot range',0 |
||
104 | db 0x01,0x51,'Target printer',0 |
||
105 | db 0x01,0x52,'Extra samples',0 |
||
106 | db 0x01,0x53,'Sample format',0 |
||
107 | db 0x01,0x54,'SMin sample value',0 |
||
108 | db 0x01,0x55,'SMax sample value',0 |
||
109 | db 0x01,0x56,'Transfer range',0 |
||
110 | db 0x01,0x57,'Clip path',0 |
||
111 | db 0x01,0x58,'X clip path units',0 |
||
112 | db 0x01,0x59,'Y clip path units',0 |
||
113 | db 0x01,0x5a,'Indexed',0 |
||
114 | db 0x01,0x5b,'JPEG tables',0 |
||
115 | db 0x01,0x5f,'OPIProxy',0 |
||
116 | db 0x01,0x90,'Global parameters IFD',0 |
||
117 | db 0x01,0x91,'Profile type',0 |
||
118 | db 0x01,0x92,'Fax profile',0 |
||
119 | db 0x01,0x93,'Coding methods',0 |
||
120 | db 0x01,0x94,'Version year',0 |
||
121 | db 0x01,0x95,'Mode number',0 |
||
122 | db 0x01,0xb1,'Decode',0 |
||
123 | db 0x01,0xb2,'Default image color',0 |
||
124 | db 0x01,0xb3,'T82 options',0 |
||
125 | db 0x01,0xb5,'JPEG tables',0 ;уже было ? |
||
126 | db 0x02,0x00,'JPEG proc',0 |
||
127 | db 0x02,0x01,'Thumbnail offset',0 |
||
128 | db 0x02,0x02,'Thumbnail length',0 |
||
129 | db 0x02,0x03,'JPEG restart interval',0 |
||
130 | db 0x02,0x05,'JPEG lossless predictors',0 |
||
131 | db 0x02,0x06,'JPEG point transforms',0 |
||
132 | db 0x02,0x07,'JPEG QTables',0 |
||
133 | db 0x02,0x08,'JPEG DCTables',0 |
||
134 | db 0x02,0x09,'JPEG ACTables',0 |
||
4994 | IgorA | 135 | db 0x02,0x11,'YCbCrCoefficients',0 |
5002 | IgorA | 136 | db 0x02,0x12,'YCbCrSubSampling',0 |
4994 | IgorA | 137 | db 0x02,0x13,'YCbCrPositioning',0 |
138 | db 0x02,0x14,'Reference black white',0 |
||
5002 | IgorA | 139 | db 0x02,0x2f,'Strip row counts',0 |
140 | db 0x03,0xe7,'USPTO Miscellaneous',0 |
||
141 | db 0x47,0x46,'Rating',0 |
||
142 | db 0x47,0x47,'XP_DIP_XML',0 |
||
143 | db 0x47,0x48,'Stitch info',0 |
||
144 | db 0x47,0x49,'Rating percent',0 |
||
145 | db 0x80,0x0d,'Image ID',0 |
||
146 | db 0x80,0xa3,'Wang tag 1',0 |
||
147 | db 0x80,0xa4,'Wang annotation',0 |
||
148 | db 0x80,0xa5,'Wang tag 3',0 |
||
149 | db 0x80,0xa6,'Wang tag 4',0 |
||
150 | db 0x80,0xe3,'Matteing',0 |
||
151 | db 0x80,0xe4,'Data type',0 |
||
152 | db 0x80,0xe5,'Image depth',0 |
||
153 | db 0x80,0xe6,'Tile depth',0 |
||
154 | db 0x82,0x7d,'Model 2',0 |
||
155 | db 0x82,0x8d,'CFA repeat pattern dim',0 |
||
156 | db 0x82,0x8e,'CFA pattern 2',0 |
||
157 | db 0x82,0x8f,'Battery level',0 |
||
158 | db 0x82,0x90,'Kodak IFD',0 |
||
4994 | IgorA | 159 | db 0x82,0x98,'Copyright',0 |
5002 | IgorA | 160 | db 0x82,0xa5,'MD file tag',0 |
161 | db 0x82,0xa6,'MD scale pixel',0 |
||
162 | db 0x82,0xa7,'MD color table',0 |
||
163 | db 0x82,0xa8,'MD lab name',0 |
||
164 | db 0x82,0xa9,'MD sample info',0 |
||
165 | db 0x82,0xaa,'MD prep date',0 |
||
166 | db 0x82,0xab,'MD prep time',0 |
||
167 | db 0x82,0xac,'MD file units',0 |
||
168 | db 0x83,0x0e,'Pixel scale',0 |
||
169 | db 0x83,0x35,'Advent scale',0 |
||
170 | db 0x83,0x36,'Advent revision',0 |
||
171 | db 0x83,0x5c,'UIC1 tag',0 |
||
172 | db 0x83,0x5d,'UIC2 tag',0 |
||
173 | db 0x83,0x5e,'UIC3 tag',0 |
||
174 | db 0x83,0x5f,'UIC4 tag',0 |
||
175 | db 0x83,0xbb,'IPTC-NAA',0 |
||
176 | db 0x84,0x7e,'Intergraph packet data',0 |
||
177 | db 0x84,0x7f,'Intergraph flag registers',0 |
||
178 | db 0x84,0x80,'Intergraph matrix',0 |
||
179 | db 0x84,0x81,'INGR reserved',0 |
||
180 | db 0x84,0x82,'Model tie point',0 |
||
181 | db 0x84,0xe0,'Site',0 |
||
182 | db 0x84,0xe1,'Color sequence',0 |
||
183 | db 0x84,0xe2,'IT8 header',0 |
||
184 | db 0x84,0xe3,'Raster padding',0 |
||
185 | db 0x84,0xe4,'Bits per run length',0 |
||
186 | db 0x84,0xe5,'Bits per extended run length',0 |
||
187 | db 0x84,0xe6,'Color table',0 |
||
188 | db 0x84,0xe7,'Image color indicator',0 |
||
189 | db 0x84,0xe8,'Background color indicator',0 |
||
190 | db 0x84,0xe9,'Image color value',0 |
||
191 | db 0x84,0xea,'Background color value',0 |
||
192 | db 0x84,0xeb,'Pixel intensity range',0 |
||
193 | db 0x84,0xec,'Transparency indicator',0 |
||
194 | db 0x84,0xed,'Color characterization',0 |
||
195 | db 0x84,0xee,'HCUsage',0 |
||
196 | db 0x84,0xef,'Trap indicator',0 |
||
197 | db 0x84,0xf0,'CMYK equivalent',0 |
||
198 | db 0x85,0x46,'SEM info',0 |
||
199 | db 0x85,0x68,'AFCP_IPTC',0 |
||
200 | db 0x85,0xb8,'Pixel magic JBIG options',0 |
||
201 | db 0x85,0xd8,'Model transform',0 |
||
202 | db 0x86,0x02,'WB_GRGB levels',0 |
||
203 | db 0x86,0x06,'Leaf data',0 |
||
204 | db 0x86,0x49,'Photoshop settings',0 |
||
4994 | IgorA | 205 | db 0x87,0x69,'Exif offset',0 |
5002 | IgorA | 206 | db 0x87,0x73,'ICC_Profile',0 |
207 | db 0x87,0x7f,'TIFF_FX extensions',0 |
||
208 | db 0x87,0x80,'Multi profiles',0 |
||
209 | db 0x87,0x81,'Shared data',0 |
||
210 | db 0x87,0x82,'T88 options',0 |
||
211 | db 0x87,0xac,'Image layer',0 |
||
212 | db 0x87,0xaf,'Geo tiff directory',0 |
||
213 | db 0x87,0xb0,'Geo tiff double params',0 |
||
214 | db 0x87,0xb1,'Geo tiff ascii params',0 |
||
215 | db 0x88,0x28,'Opto-Electric conv factor',0 |
||
216 | db 0x88,0x29,'Interlace',0 |
||
217 | db 0x88,0x5c,'Fax recv params',0 |
||
218 | db 0x88,0x5d,'Fax sub address',0 |
||
219 | db 0x88,0x5e,'Fax recv time',0 |
||
220 | db 0x88,0x8a,'Leaf sub IFD',0 |
||
221 | db 0x92,0x0b,'Flash energy',0 |
||
222 | db 0x92,0x0c,'Spatial frequency response',0 |
||
223 | db 0x92,0x0d,'Noise',0 |
||
224 | db 0x92,0x0e,'Focal plane X resolution',0 |
||
225 | db 0x92,0x0f,'Focal plane Y resolution',0 |
||
226 | db 0x92,0x10,'Focal plane resolution unit',0 |
||
227 | db 0x92,0x15,'Exposure index',0 |
||
228 | db 0x92,0x16,'TIFF-EP standard ID',0 |
||
229 | db 0x92,0x17,'Sensing method',0 |
||
230 | db 0x92,0x3a,'CIP3 data file',0 |
||
231 | db 0x92,0x3b,'CIP3 sheet',0 |
||
232 | db 0x92,0x3c,'CIP3 side',0 |
||
233 | db 0x92,0x3f,'Sto nits',0 |
||
234 | db 0x93,0x2f,'MS document text',0 |
||
235 | db 0x93,0x30,'MS property set storage',0 |
||
236 | db 0x93,0x31,'MS document text position',0 |
||
237 | db 0x93,0x5c,'Image source data',0 |
||
238 | db 0x9c,0x9b,'XP title',0 |
||
239 | db 0x9c,0x9c,'XP comment',0 |
||
240 | db 0x9c,0x9d,'XP author',0 |
||
241 | db 0x9c,0x9e,'XP keywords',0 |
||
242 | db 0x9c,0x9f,'XP subject',0 |
||
243 | db 0xa2,0x0c,'Spatial frequency fesponse',0 |
||
244 | db 0xa2,0x0d,'Noise',0 |
||
245 | db 0xa2,0x11,'Image number',0 |
||
246 | db 0xa2,0x12,'Security classification',0 |
||
247 | db 0xa2,0x13,'Image history',0 |
||
248 | db 0xa2,0x16,'TIFF-EP standard ID',0 |
||
4995 | IgorA | 249 | db 0xa4,0x80,'GDAL metadata',0 |
250 | db 0xa4,0x81,'GDAL no data',0 |
||
251 | db 0xaf,0xc0,'Expand software',0 |
||
252 | db 0xaf,0xc1,'Expand lens',0 |
||
253 | db 0xaf,0xc2,'Expand film',0 |
||
254 | db 0xaf,0xc3,'Expand filterLens',0 |
||
255 | db 0xaf,0xc4,'Expand scanner',0 |
||
256 | db 0xaf,0xc5,'Expand flash lamp',0 |
||
5002 | IgorA | 257 | db 0xbc,0x01,'Pixel format',0 |
258 | db 0xbc,0x02,'Transformation',0 |
||
259 | db 0xbc,0x03,'Uncompressed',0 |
||
260 | db 0xbc,0x04,'Image type',0 |
||
261 | db 0xbc,0x80,'Image width',0 |
||
262 | db 0xbc,0x81,'Image height',0 |
||
263 | db 0xbc,0x82,'Width resolution',0 |
||
264 | db 0xbc,0x83,'Height resolution',0 |
||
265 | db 0xbc,0xc0,'Image offset',0 |
||
266 | db 0xbc,0xc1,'Image byte count',0 |
||
267 | db 0xbc,0xc2,'Alpha offset',0 |
||
268 | db 0xbc,0xc3,'Alpha byte count',0 |
||
269 | db 0xbc,0xc4,'Image data discard',0 |
||
270 | db 0xbc,0xc5,'Alpha data discard',0 |
||
271 | db 0xc4,0x27,'Oce scanjob desc',0 |
||
272 | db 0xc4,0x28,'Oce application selector',0 |
||
273 | db 0xc4,0x29,'Oce ID number',0 |
||
274 | db 0xc4,0x2a,'Oce image logic',0 |
||
275 | db 0xc4,0x4f,'Annotations',0 |
||
276 | db 0xc4,0xa5,'Print IM',0 |
||
277 | db 0xc5,0x73,'Original file name',0 |
||
278 | db 0xc5,0x80,'USPTO original content type',0 |
||
279 | db 0xc6,0x12,'DNG version',0 |
||
280 | db 0xc6,0x13,'DNG backward version',0 |
||
281 | db 0xc6,0x14,'Unique camera model',0 |
||
282 | db 0xc6,0x15,'Localized camera model',0 |
||
283 | db 0xc6,0x16,'CFA plane color',0 |
||
284 | db 0xc6,0x17,'CFA layout',0 |
||
285 | db 0xc6,0x18,'Linearization table',0 |
||
286 | db 0xc6,0x19,'Black level repeat dim',0 |
||
287 | db 0xc6,0x1a,'Black level',0 |
||
288 | db 0xc6,0x1b,'Black level delta H',0 |
||
289 | db 0xc6,0x1c,'Black level delta V',0 |
||
290 | db 0xc6,0x1d,'White level',0 |
||
291 | db 0xc6,0x1e,'Default scale',0 |
||
292 | db 0xc6,0x1f,'Default crop origin',0 |
||
293 | db 0xc6,0x20,'Default crop size',0 |
||
294 | db 0xc6,0x21,'Color matrix 1',0 |
||
295 | db 0xc6,0x22,'Color matrix 2',0 |
||
296 | db 0xc6,0x23,'Camera calibration 1',0 |
||
297 | db 0xc6,0x24,'Camera calibration 2',0 |
||
298 | db 0xc6,0x25,'Reduction matrix 1',0 |
||
299 | db 0xc6,0x26,'Reduction matrix 2',0 |
||
300 | db 0xc6,0x27,'Analog balance',0 |
||
301 | db 0xc6,0x28,'As shot neutral',0 |
||
302 | db 0xc6,0x29,'As shot white XY',0 |
||
303 | db 0xc6,0x2a,'BaselineExposure',0 |
||
304 | db 0xc6,0x2b,'BaselineNoise',0 |
||
305 | db 0xc6,0x2c,'BaselineSharpness',0 |
||
306 | db 0xc6,0x2d,'BayerGreenSplit',0 |
||
307 | db 0xc6,0x2e,'Linear response limit',0 |
||
308 | db 0xc6,0x2f,'Camera serial number',0 |
||
309 | db 0xc6,0x30,'DNG lens info',0 |
||
310 | db 0xc6,0x31,'Chroma blur radius',0 |
||
311 | db 0xc6,0x32,'Anti alias strength',0 |
||
312 | db 0xc6,0x33,'Shadow scale',0 |
||
313 | db 0xc6,0x34,'SR2 private',0 |
||
314 | db 0xc6,0x35,'Maker note safety',0 |
||
315 | db 0xc6,0x40,'Raw image segmentation',0 |
||
316 | db 0xc6,0x5a,'Calibration illuminant 1',0 |
||
317 | db 0xc6,0x5b,'Calibration illuminant 2',0 |
||
318 | db 0xc6,0x5c,'Best quality scale',0 |
||
319 | db 0xc6,0x5d,'Raw data unique ID',0 |
||
320 | db 0xc6,0x60,'Alias layer metadata',0 |
||
321 | db 0xc6,0x8b,'Original raw file name',0 |
||
322 | db 0xc6,0x8c,'Original raw file data',0 |
||
323 | db 0xc6,0x8d,'Active area',0 |
||
324 | db 0xc6,0x8e,'Masked areas',0 |
||
325 | db 0xc6,0x8f,'AsShot ICC profile',0 |
||
326 | db 0xc6,0x90,'AsShot pre profile matrix',0 |
||
327 | db 0xc6,0x91,'Current ICC profile',0 |
||
328 | db 0xc6,0x92,'Current pre profile matrix',0 |
||
329 | db 0xc6,0xbf,'Colorimetric reference',0 |
||
330 | db 0xc6,0xd2,'Panasonic title',0 |
||
331 | db 0xc6,0xd3,'Panasonic title 2',0 |
||
332 | db 0xc6,0xf3,'Camera calibration sig',0 |
||
333 | db 0xc6,0xf4,'Profile calibration sig',0 |
||
334 | db 0xc6,0xf5,'Profile IFD',0 |
||
335 | db 0xc6,0xf6,'AsShot profile name',0 |
||
336 | db 0xc6,0xf7,'Noise reduction applied',0 |
||
337 | db 0xc6,0xf8,'Profile name',0 |
||
338 | db 0xc6,0xf9,'Profile hue sat map dims',0 |
||
339 | db 0xc6,0xfa,'Profile hue sat map data 1',0 |
||
340 | db 0xc6,0xfb,'Profile hue sat map data 2',0 |
||
341 | db 0xc6,0xfc,'Profile tone curve',0 |
||
342 | db 0xc6,0xfd,'Profile embed policy',0 |
||
343 | db 0xc6,0xfe,'Profile copyright',0 |
||
344 | db 0xc7,0x14,'Forward matrix 1',0 |
||
345 | db 0xc7,0x15,'Forward matrix 2',0 |
||
346 | db 0xc7,0x16,'Preview application name',0 |
||
347 | db 0xc7,0x17,'Preview application version',0 |
||
348 | db 0xc7,0x18,'Preview settings name',0 |
||
349 | db 0xc7,0x19,'Preview settings digest',0 |
||
350 | db 0xc7,0x1a,'Preview color space',0 |
||
351 | db 0xc7,0x1b,'Preview date time',0 |
||
352 | db 0xc7,0x1c,'Raw image digest',0 |
||
353 | db 0xc7,0x1d,'Original raw file digest',0 |
||
354 | db 0xc7,0x1e,'Sub tile block size',0 |
||
355 | db 0xc7,0x1f,'Row interleave factor',0 |
||
356 | db 0xc7,0x25,'Profile look table dims',0 |
||
357 | db 0xc7,0x26,'Profile look table data',0 |
||
358 | db 0xc7,0x40,'Opcode list 1',0 |
||
359 | db 0xc7,0x41,'Opcode list 2',0 |
||
360 | db 0xc7,0x4e,'Opcode list 3',0 |
||
361 | db 0xc7,0x61,'Noise profile',0 |
||
362 | db 0xc7,0x63,'Time codes',0 |
||
363 | db 0xc7,0x64,'Frame rate',0 |
||
364 | db 0xc7,0x72,'TStop',0 |
||
365 | db 0xc7,0x89,'Reel name',0 |
||
366 | db 0xc7,0x91,'Original default final size',0 |
||
367 | db 0xc7,0x92,'Original best quality size',0 |
||
368 | db 0xc7,0x93,'Original default crop size',0 |
||
369 | db 0xc7,0xa1,'Camera label',0 |
||
370 | db 0xc7,0xa3,'Profile hue sat map encoding',0 |
||
371 | db 0xc7,0xa4,'Profile look table encoding',0 |
||
372 | db 0xc7,0xa5,'Baseline exposure offset',0 |
||
373 | db 0xc7,0xa6,'Default black render',0 |
||
374 | db 0xc7,0xa7,'New raw image digest',0 |
||
375 | db 0xc7,0xa8,'Raw to preview gain',0 |
||
376 | db 0xc7,0xb5,'Default user crop',0 |
||
5008 | IgorA | 377 | db 0xfe,0x00,'KDC_IFD',0 |
378 | |||
379 | dd 0 |
||
380 | |||
381 | align 4 |
||
382 | gr_8769: |
||
383 | db 0x02,0xbc,'Application notes',0 |
||
384 | db 0x82,0x9a,'Exposure time',0 |
||
385 | db 0x82,0x9d,'F number',0 |
||
386 | db 0x88,0x22,'Exposure program',0 |
||
387 | db 0x88,0x24,'Spectral sensitivity',0 |
||
388 | db 0x88,0x25,'GPS info',0 |
||
389 | db 0x88,0x27,'ISO',0 |
||
390 | db 0x88,0x2a,'Time zone offset',0 |
||
391 | db 0x88,0x2b,'Self timer mode',0 |
||
392 | db 0x88,0x30,'Sensitivity type',0 |
||
393 | db 0x88,0x31,'Standard output sensitivity',0 |
||
394 | db 0x88,0x32,'Recommended exposure index',0 |
||
395 | db 0x88,0x33,'ISO speed',0 |
||
396 | db 0x88,0x34,'ISO speed latitude yyy',0 |
||
397 | db 0x88,0x35,'ISO speed latitude zzz',0 |
||
398 | db 0x90,0x00,'Exif version',0 |
||
399 | db 0x90,0x03,'Date time original',0 |
||
400 | db 0x90,0x04,'Create date',0 |
||
401 | db 0x91,0x01,'Components configuration',0 |
||
402 | db 0x91,0x02,'Compressed bits per pixel',0 |
||
403 | db 0x92,0x01,'Shutter speed value',0 |
||
404 | db 0x92,0x02,'Aperture value',0 |
||
405 | db 0x92,0x03,'Brightness value',0 |
||
406 | db 0x92,0x04,'Exposure compensation',0 |
||
407 | db 0x92,0x05,'Max aperture value',0 |
||
408 | db 0x92,0x06,'Subject distance',0 |
||
409 | db 0x92,0x07,'Metering mode',0 |
||
410 | db 0x92,0x08,'Light source',0 |
||
411 | db 0x92,0x09,'Flash',0 |
||
412 | db 0x92,0x0a,'Focal length',0 |
||
413 | db 0x92,0x11,'Image number',0 |
||
414 | db 0x92,0x12,'Security classification',0 |
||
415 | db 0x92,0x13,'Image history',0 |
||
416 | db 0x92,0x14,'Subject area',0 |
||
417 | db 0x92,0x7c,'Maker note',0 |
||
418 | db 0x92,0x86,'User comment',0 |
||
419 | db 0x92,0x90,'Sub sec time',0 |
||
420 | db 0x92,0x91,'Sub sec time original',0 |
||
421 | db 0x92,0x92,'Sub sec time digitized',0 |
||
422 | db 0xa0,0x00,'Flashpix version',0 |
||
423 | db 0xa0,0x01,'Color space',0 |
||
424 | db 0xa0,0x02,'Exif image width',0 |
||
425 | db 0xa0,0x03,'Exif image height',0 |
||
426 | db 0xa0,0x04,'Related sound file',0 |
||
427 | db 0xa0,0x05,'Interop offset',0 |
||
428 | db 0xa2,0x0b,'Flash energy',0 |
||
429 | db 0xa2,0x0e,'Focal plane X resolution',0 |
||
430 | db 0xa2,0x0f,'Focal plane Y resolution',0 |
||
431 | db 0xa2,0x10,'Focal plane resolution unit',0 |
||
432 | db 0xa2,0x14,'Subject location',0 |
||
433 | db 0xa2,0x15,'Exposure index',0 |
||
434 | db 0xa2,0x17,'Sensing method',0 |
||
435 | db 0xa3,0x00,'File source',0 |
||
436 | db 0xa3,0x01,'Scene type',0 |
||
437 | db 0xa3,0x02,'CFA pattern',0 |
||
438 | db 0xa4,0x01,'Custom rendered',0 |
||
439 | db 0xa4,0x02,'Exposure mode',0 |
||
440 | db 0xa4,0x03,'White balance',0 |
||
441 | db 0xa4,0x04,'Digital zoom ratio',0 |
||
442 | db 0xa4,0x05,'Focal length in 35mm format',0 |
||
443 | db 0xa4,0x06,'Scene capture type',0 |
||
444 | db 0xa4,0x07,'Gain control',0 |
||
445 | db 0xa4,0x08,'Contrast',0 |
||
446 | db 0xa4,0x09,'Saturation',0 |
||
447 | db 0xa4,0x0a,'Sharpness',0 |
||
448 | db 0xa4,0x0b,'Device setting description',0 |
||
449 | db 0xa4,0x0c,'Subject distance range',0 |
||
450 | db 0xa4,0x20,'Image unique ID',0 |
||
451 | db 0xa4,0x30,'Owner name',0 |
||
452 | db 0xa4,0x31,'Serial number',0 |
||
453 | db 0xa4,0x32,'Lens info',0 |
||
454 | db 0xa4,0x33,'Lens make',0 |
||
455 | db 0xa4,0x34,'Lens model',0 |
||
456 | db 0xa4,0x35,'Lens serial number',0 |
||
457 | db 0xa5,0x00,'Gamma',0 |
||
5002 | IgorA | 458 | db 0xea,0x1c,'Padding',0 |
459 | db 0xea,0x1d,'Offset schema',0 |
||
460 | db 0xfd,0xe8,'Owner name',0 |
||
461 | db 0xfd,0xe9,'Serial number',0 |
||
462 | db 0xfd,0xea,'Lens',0 |
||
463 | db 0xfe,0x4c,'Raw file',0 |
||
464 | db 0xfe,0x4d,'Converter',0 |
||
465 | db 0xfe,0x4e,'White balance',0 |
||
466 | db 0xfe,0x51,'Exposure',0 |
||
467 | db 0xfe,0x52,'Shadows',0 |
||
468 | db 0xfe,0x53,'Brightness',0 |
||
469 | db 0xfe,0x54,'Contrast',0 |
||
470 | db 0xfe,0x55,'Saturation',0 |
||
471 | db 0xfe,0x56,'Sharpness',0 |
||
472 | db 0xfe,0x57,'Smoothness',0 |
||
473 | db 0xfe,0x58,'Moire filter',0 |
||
4995 | IgorA | 474 | |
5008 | IgorA | 475 | dd 0 |
476 | |||
477 | align 4 |
||
478 | gr_a005: |
||
479 | db 0x00,0x01,'Interop index',0 |
||
480 | db 0x00,0x02,'Interop version',0 |
||
481 | db 0x10,0x00,'Related image file format',0 |
||
482 | db 0x10,0x01,'Related image width',0 |
||
483 | db 0x10,0x02,'Related image height',0 |
||
484 | dd 0 |
||
485 | |||
486 | align 4 |
||
487 | gr_8825: |
||
5007 | IgorA | 488 | db 0x00,0x00,'GPS version ID',0 |
5008 | IgorA | 489 | db 0x00,0x01,'GPS latitude ref',0 |
490 | db 0x00,0x02,'GPS latitude',0 |
||
491 | db 0x00,0x03,'GPS longitude ref',0 |
||
492 | db 0x00,0x04,'GPS longitude',0 |
||
493 | db 0x00,0x05,'GPS altitude ref',0 |
||
494 | db 0x00,0x06,'GPS altitude',0 |
||
495 | db 0x00,0x07,'GPS time stamp',0 |
||
496 | db 0x00,0x08,'GPS satellites',0 |
||
497 | db 0x00,0x09,'GPS status',0 |
||
498 | db 0x00,0x0a,'GPS measuremode',0 |
||
499 | db 0x00,0x0b,'GPS dop',0 |
||
500 | db 0x00,0x0c,'GPS speed ref',0 |
||
501 | db 0x00,0x0d,'GPS speed',0 |
||
502 | db 0x00,0x0e,'GPS track ref',0 |
||
503 | db 0x00,0x0f,'GPS track',0 |
||
504 | db 0x00,0x10,'GPS img direction ref',0 |
||
505 | db 0x00,0x11,'GPS img direction',0 |
||
506 | db 0x00,0x12,'GPS map datum',0 |
||
507 | db 0x00,0x13,'GPS dest latitude ref',0 |
||
508 | db 0x00,0x14,'GPS dest latitude',0 |
||
509 | db 0x00,0x15,'GPS dest longitude ref',0 |
||
510 | db 0x00,0x16,'GPS dest longitude',0 |
||
511 | db 0x00,0x17,'GPS dest bearing ref',0 |
||
512 | db 0x00,0x18,'GPS dest bearing',0 |
||
513 | db 0x00,0x19,'GPS dest distance ref',0 |
||
514 | db 0x00,0x1a,'GPS dest distance',0 |
||
515 | db 0x00,0x1b,'GPS processing method',0 |
||
516 | db 0x00,0x1c,'GPS area information',0 |
||
517 | db 0x00,0x1d,'GPS date stamp',0 |
||
518 | db 0x00,0x1e,'GPS differential',0 |
||
519 | db 0x00,0x1f,'GPS h positioning error',0 |
||
4994 | IgorA | 520 | |
5007 | IgorA | 521 | dd 0 |
522 | |||
4994 | IgorA | 523 | ;input: |
524 | ; bof - указатель на начало файла |
||
525 | ; app1 - указатель для заполнения exif.app1 |
||
526 | ;output: |
||
527 | ; app1 - указатель на начало exif.app1 (или 0 если не найдено или формат файла не поддерживается) |
||
528 | align 4 |
||
529 | proc exif_get_app1 uses eax ebx edi, bof:dword, app1:dword |
||
530 | mov eax,[bof] |
||
531 | mov edi,[app1] |
||
532 | |||
533 | ;файл в формате jpg? |
||
534 | cmp word[eax],0xd8ff |
||
535 | jne .no_exif |
||
536 | add eax,2 |
||
537 | |||
538 | ;файл содержит exif.app0? |
||
539 | cmp word[eax],0xe0ff |
||
540 | jne @f |
||
541 | add eax,2 |
||
542 | movzx ebx,word[eax] |
||
543 | ror bx,8 ;всегда ли так надо? |
||
544 | add eax,ebx |
||
545 | @@: |
||
546 | |||
547 | ;файл содержит exif.app1? |
||
548 | cmp word[eax],0xe1ff |
||
549 | jne .no_exif |
||
550 | |||
5007 | IgorA | 551 | xor ebx,ebx |
552 | cmp word[eax+10],'II' |
||
553 | je @f |
||
554 | inc ebx ;if 'MM' edx=1 |
||
555 | @@: |
||
556 | mov [edi+offs_m_or_i],ebx |
||
5008 | IgorA | 557 | ;пишем одной командой в dword[edi+offs_m_or_i] |
558 | ;в младшие 2 байта способ выравнивания чисел |
||
559 | ;в старшие 2 байта id групы, который всегда 0 для app1 |
||
5007 | IgorA | 560 | add eax,18 |
4994 | IgorA | 561 | mov [edi],eax |
5007 | IgorA | 562 | sub eax,8 |
563 | mov [edi+4],eax |
||
4994 | IgorA | 564 | |
565 | jmp @f |
||
566 | .no_exif: |
||
567 | mov dword[edi],0 |
||
568 | @@: |
||
569 | ret |
||
570 | endp |
||
571 | |||
572 | ;input: |
||
573 | ; app1 - указатель на начало exif.app1 |
||
574 | ; num - порядковый номер тега (начинается с 1) |
||
575 | ; txt - указатель на текст, куда будет записано значение |
||
576 | ; t_max - максимальный размер текста |
||
577 | align 4 |
||
578 | proc exif_get_app1_tag, app1:dword, num:dword, txt:dword, t_max:dword |
||
579 | pushad |
||
580 | mov eax,[app1] |
||
581 | mov edi,[txt] |
||
582 | mov ecx,[num] |
||
583 | |||
584 | xor edx,edx |
||
5002 | IgorA | 585 | mov byte[edi],dl |
5007 | IgorA | 586 | cmp [eax],edx |
4994 | IgorA | 587 | je .end_f ;если не найден указатель на начало exif.app1 |
588 | cmp ecx,edx |
||
589 | jle .end_f ;если порядковый номер тега <= 0 |
||
590 | |||
5007 | IgorA | 591 | movzx edx,word[eax+offs_m_or_i] ;if 'MM' edx=1 |
4994 | IgorA | 592 | |
593 | ;проверяем число тегов |
||
5007 | IgorA | 594 | mov eax,[eax] |
595 | movzx ebx,word[eax] |
||
4994 | IgorA | 596 | bt edx,0 |
597 | jnc @f |
||
598 | ror bx,8 |
||
599 | @@: |
||
600 | cmp ecx,ebx |
||
601 | jg .end_f ;если номер тега больше чем их есть в файле |
||
602 | |||
603 | ;переходим на заданный тег |
||
604 | dec ecx |
||
605 | imul ecx,tag_size |
||
606 | add eax,offs_tag_0 |
||
607 | add eax,ecx |
||
608 | |||
5002 | IgorA | 609 | stdcall read_tag_value,[app1],[t_max] |
610 | |||
611 | .end_f: |
||
612 | popad |
||
613 | ret |
||
614 | endp |
||
615 | |||
616 | ;input: |
||
5007 | IgorA | 617 | ; app1 - указатель на exif.app1 или на exif.app1.child |
5002 | IgorA | 618 | ; child - указатель для заполнения начала дочерних тегов exif.app1.child |
619 | ; c_tag - тег для которого делается поиск дочерних |
||
620 | ;output: |
||
621 | ; child - указатель на начало дочерних тегов |
||
622 | align 4 |
||
623 | proc exif_get_app1_child, app1:dword, child:dword , c_tag:dword |
||
624 | pushad |
||
625 | mov eax,[app1] |
||
626 | mov edi,[child] |
||
627 | |||
628 | xor edx,edx |
||
5007 | IgorA | 629 | cmp [eax],edx |
630 | je .no_found ;если не найден указатель на начало exif.app1 |
||
5002 | IgorA | 631 | |
5007 | IgorA | 632 | movzx edx,word[eax+offs_m_or_i] ;if 'MM' edx=1 |
5002 | IgorA | 633 | |
634 | ;начало поиска |
||
635 | mov ebx,[c_tag] |
||
636 | bt edx,0 |
||
637 | jnc @f |
||
638 | ror bx,8 |
||
639 | @@: |
||
640 | |||
641 | ;проверяем число тегов |
||
5007 | IgorA | 642 | mov eax,[eax] |
643 | movzx ecx,word[eax] |
||
5002 | IgorA | 644 | bt edx,0 |
645 | jnc @f |
||
646 | ror cx,8 |
||
647 | @@: |
||
648 | cmp ecx,1 |
||
5007 | IgorA | 649 | jl .no_found ;если число тегов <1 |
5002 | IgorA | 650 | |
651 | ;переходим на 1-й тег |
||
652 | add eax,offs_tag_0 |
||
653 | @@: |
||
654 | cmp word[eax],bx |
||
655 | je @f |
||
656 | add eax,tag_size |
||
657 | loop @b |
||
5007 | IgorA | 658 | jmp .no_found ;если не найдено |
5002 | IgorA | 659 | @@: ;если найдено |
660 | mov ebx,dword[eax+8] |
||
661 | bt edx,0 |
||
662 | jnc @f |
||
663 | ror bx,8 |
||
664 | ror ebx,16 |
||
665 | ror bx,8 |
||
666 | @@: |
||
5007 | IgorA | 667 | mov eax,[app1] |
668 | add ebx,[eax+4] |
||
5002 | IgorA | 669 | mov dword[edi],ebx |
5007 | IgorA | 670 | m2m dword[edi+4],dword[eax+4] |
5008 | IgorA | 671 | ror edx,16 |
672 | mov dx,word[c_tag] |
||
673 | ror edx,16 |
||
5007 | IgorA | 674 | mov dword[edi+offs_m_or_i],edx |
5002 | IgorA | 675 | |
5007 | IgorA | 676 | jmp .end_f |
677 | .no_found: |
||
678 | mov dword[edi],0 |
||
5002 | IgorA | 679 | .end_f: |
680 | popad |
||
681 | ret |
||
682 | endp |
||
683 | |||
684 | ;description: |
||
685 | ; вспомогательная функция для чтения назначений тегов |
||
686 | ;input: |
||
687 | ; eax - указатель начала тега |
||
688 | ; edi - указатель на память для записи текстовой строки |
||
689 | align 4 |
||
690 | proc read_tag_value, app1:dword, t_max:dword |
||
4994 | IgorA | 691 | push exif_tag_numbers |
692 | pop esi |
||
5008 | IgorA | 693 | |
694 | ;поиск таблицы для группы тегов |
||
695 | mov ebx,[app1] |
||
696 | mov bx,word[ebx+offs_id_gr] ;берем идентификатор группы тегов |
||
697 | @@: |
||
698 | cmp word[esi],bx |
||
699 | je .set_table |
||
700 | add esi,8 |
||
701 | cmp esi,exif_tag_numbers.end |
||
702 | jge .tag_unknown ;тег не опознан (не найдена таблица группы тегов) |
||
703 | jmp @b |
||
704 | .set_table: |
||
705 | mov esi,dword[esi+4] ;установка адреса таблицы в esi |
||
706 | |||
707 | ;поиск названия тега в таблице |
||
4994 | IgorA | 708 | .next_tag: |
709 | mov bx,word[esi] |
||
710 | cmp bx,0 |
||
5007 | IgorA | 711 | jne @f |
712 | cmp dword[esi],0 |
||
713 | jne @f |
||
5008 | IgorA | 714 | jmp .tag_unknown ;тег не опознан (в группе не найден тег) |
5007 | IgorA | 715 | @@: |
4994 | IgorA | 716 | bt edx,0 |
717 | jc @f |
||
718 | ror bx,8 |
||
719 | @@: |
||
720 | cmp word[eax],bx |
||
721 | je .found |
||
722 | inc esi |
||
723 | @@: |
||
724 | inc esi |
||
725 | cmp byte[esi],0 |
||
726 | jne @b |
||
727 | inc esi |
||
728 | jmp .next_tag |
||
729 | .found: |
||
730 | |||
5008 | IgorA | 731 | ;копируем строку с названием тега |
4994 | IgorA | 732 | add esi,2 |
733 | stdcall str_n_cat,edi,esi,[t_max] |
||
734 | |||
4995 | IgorA | 735 | jmp @f |
736 | .tag_unknown: |
||
5008 | IgorA | 737 | ;если тег не найден ставим его код вместо названия |
738 | movzx ebx,word[eax] |
||
739 | stdcall hex_in_str, edi, ebx,4 |
||
740 | mov byte[edi+4],0 |
||
4995 | IgorA | 741 | @@: |
742 | |||
4994 | IgorA | 743 | ;читаем информацию в теге |
5008 | IgorA | 744 | mov bx,tag_format_ui1b |
745 | bt edx,0 |
||
746 | jnc @f |
||
747 | ror bx,8 |
||
748 | @@: |
||
749 | cmp word[eax+2],bx |
||
750 | jne .tag_01 |
||
751 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
752 | call get_tag_data_size |
||
753 | cmp ebx,1 |
||
754 | jg .over4b_01 |
||
755 | ;если одно 1 байтовое число |
||
756 | movzx ebx,byte[eax+8] |
||
757 | ;bt edx,0 |
||
758 | ;jnc @f |
||
759 | ; ror bx,8 |
||
760 | ;@@: |
||
761 | stdcall str_len,edi |
||
762 | add edi,eax |
||
763 | mov eax,ebx |
||
764 | call convert_int_to_str ;[t_max] |
||
765 | .over4b_01: |
||
766 | ;... |
||
767 | jmp .end_f |
||
768 | .tag_01: |
||
769 | |||
4994 | IgorA | 770 | mov bx,tag_format_text |
771 | bt edx,0 |
||
772 | jnc @f |
||
773 | ror bx,8 |
||
774 | @@: |
||
775 | cmp word[eax+2],bx |
||
776 | jne .tag_02 |
||
777 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
4995 | IgorA | 778 | call get_tag_data_size ;проверяем длинну строки |
4994 | IgorA | 779 | cmp ebx,4 |
780 | jg @f |
||
781 | ;если строка помещается в 4 символа |
||
782 | mov esi,eax |
||
783 | add esi,8 |
||
784 | stdcall str_n_cat,edi,esi,[t_max] |
||
785 | jmp .end_f |
||
786 | ;если строка не помещается в 4 символа |
||
787 | @@: |
||
788 | mov esi,dword[eax+8] |
||
789 | bt edx,0 |
||
790 | jnc @f |
||
791 | ror si,8 |
||
792 | ror esi,16 |
||
793 | ror si,8 |
||
794 | @@: |
||
5007 | IgorA | 795 | mov eax,[app1] |
796 | mov eax,[eax+4] |
||
797 | add esi,eax |
||
4994 | IgorA | 798 | stdcall str_n_cat,edi,esi,[t_max] |
4995 | IgorA | 799 | jmp .end_f |
4994 | IgorA | 800 | .tag_02: |
801 | |||
4995 | IgorA | 802 | mov bx,tag_format_ui2b |
803 | bt edx,0 |
||
804 | jnc @f |
||
805 | ror bx,8 |
||
806 | @@: |
||
807 | cmp word[eax+2],bx |
||
808 | jne .tag_03 |
||
809 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
810 | call get_tag_data_size |
||
811 | cmp ebx,1 |
||
812 | jg .over4b_03 |
||
813 | ;если одно 2 байтовое число |
||
814 | movzx ebx,word[eax+8] |
||
815 | bt edx,0 |
||
816 | jnc @f |
||
817 | ror bx,8 |
||
818 | @@: |
||
819 | stdcall str_len,edi |
||
820 | add edi,eax |
||
821 | mov eax,ebx |
||
822 | call convert_int_to_str ;[t_max] |
||
823 | .over4b_03: |
||
824 | ;... |
||
825 | jmp .end_f |
||
826 | .tag_03: |
||
827 | |||
828 | mov bx,tag_format_ui4b |
||
829 | bt edx,0 |
||
830 | jnc @f |
||
831 | ror bx,8 |
||
832 | @@: |
||
833 | cmp word[eax+2],bx |
||
834 | jne .tag_04 |
||
835 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
836 | call get_tag_data_size |
||
837 | cmp ebx,1 |
||
838 | jg .over4b_04 |
||
839 | ;если одно 4 байтовое число |
||
840 | mov ebx,dword[eax+8] |
||
841 | bt edx,0 |
||
842 | jnc @f |
||
843 | ror bx,8 |
||
844 | ror ebx,16 |
||
845 | ror bx,8 |
||
846 | @@: |
||
847 | stdcall str_len,edi |
||
848 | add edi,eax |
||
849 | mov eax,ebx |
||
850 | call convert_int_to_str ;[t_max] |
||
851 | .over4b_04: |
||
852 | ;... |
||
853 | jmp .end_f |
||
854 | .tag_04: |
||
855 | |||
856 | mov bx,tag_format_urb |
||
857 | bt edx,0 |
||
858 | jnc @f |
||
859 | ror bx,8 |
||
860 | @@: |
||
861 | cmp word[eax+2],bx |
||
862 | jne .tag_05 |
||
863 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
864 | ;call get_tag_data_size |
||
865 | ;cmp ebx,1 |
||
866 | ;jg .over4b_05 |
||
867 | mov ebx,dword[eax+8] |
||
868 | bt edx,0 |
||
869 | jnc @f |
||
870 | ror bx,8 |
||
871 | ror ebx,16 |
||
872 | ror bx,8 |
||
873 | @@: |
||
874 | stdcall str_len,edi |
||
875 | add edi,eax |
||
5007 | IgorA | 876 | mov eax,[app1] |
877 | mov eax,[eax+4] |
||
878 | add ebx,eax |
||
4995 | IgorA | 879 | mov eax,[ebx] |
880 | bt edx,0 |
||
881 | jnc @f |
||
882 | ror ax,8 |
||
883 | ror eax,16 |
||
884 | ror ax,8 |
||
885 | @@: |
||
886 | call convert_int_to_str ;ставим 1-е число |
||
887 | stdcall str_n_cat,edi,txt_div,[t_max] ;ставим знак деления |
||
888 | stdcall str_len,edi |
||
889 | add edi,eax |
||
890 | mov eax,[ebx+4] |
||
891 | bt edx,0 |
||
892 | jnc @f |
||
893 | ror ax,8 |
||
894 | ror eax,16 |
||
895 | ror ax,8 |
||
896 | @@: |
||
897 | call convert_int_to_str ;ставим 2-е число |
||
898 | ;.over4b_05: |
||
899 | ;... |
||
5007 | IgorA | 900 | jmp .end_f |
4995 | IgorA | 901 | .tag_05: |
902 | |||
5007 | IgorA | 903 | mov bx,tag_format_si2b |
904 | bt edx,0 |
||
905 | jnc @f |
||
906 | ror bx,8 |
||
907 | @@: |
||
908 | cmp word[eax+2],bx |
||
909 | jne .tag_08 |
||
910 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
911 | call get_tag_data_size |
||
912 | cmp ebx,1 |
||
913 | jg .over4b_08 |
||
914 | ;если одно 2 байтовое число |
||
915 | movzx ebx,word[eax+8] |
||
916 | bt edx,0 |
||
917 | jnc @f |
||
918 | ror bx,8 |
||
919 | @@: |
||
920 | stdcall str_len,edi |
||
921 | add edi,eax |
||
922 | bt bx,15 |
||
923 | jnc @f |
||
924 | mov byte[edi],'-' |
||
925 | inc edi |
||
926 | neg bx |
||
927 | inc bx |
||
928 | @@: |
||
929 | mov eax,ebx |
||
930 | call convert_int_to_str ;[t_max] |
||
931 | .over4b_08: |
||
932 | ;... |
||
933 | jmp .end_f |
||
934 | .tag_08: |
||
935 | |||
936 | mov bx,tag_format_si4b |
||
937 | bt edx,0 |
||
938 | jnc @f |
||
939 | ror bx,8 |
||
940 | @@: |
||
941 | cmp word[eax+2],bx |
||
942 | jne .tag_09 |
||
943 | stdcall str_n_cat,edi,txt_dp,[t_max] |
||
944 | call get_tag_data_size |
||
945 | cmp ebx,1 |
||
946 | jg .over4b_09 |
||
947 | ;если одно 4 байтовое число |
||
948 | mov ebx,dword[eax+8] |
||
949 | bt edx,0 |
||
950 | jnc @f |
||
951 | ror bx,8 |
||
952 | ror ebx,16 |
||
953 | ror bx,8 |
||
954 | @@: |
||
955 | stdcall str_len,edi |
||
956 | add edi,eax |
||
957 | bt ebx,31 |
||
958 | jnc @f |
||
959 | mov byte[edi],'-' |
||
960 | inc edi |
||
961 | neg ebx |
||
962 | inc ebx |
||
963 | @@: |
||
964 | mov eax,ebx |
||
965 | call convert_int_to_str ;[t_max] |
||
966 | .over4b_09: |
||
967 | ;... |
||
968 | jmp .end_f |
||
969 | .tag_09: |
||
970 | |||
4994 | IgorA | 971 | .end_f: |
972 | ret |
||
973 | endp |
||
974 | |||
4995 | IgorA | 975 | ;input: |
976 | ; eax - tag pointer |
||
977 | ; edx - 1 if 'MM', 0 if 'II' |
||
978 | ;output: |
||
979 | ; ebx - data size |
||
4994 | IgorA | 980 | align 4 |
4995 | IgorA | 981 | get_tag_data_size: |
982 | mov ebx,dword[eax+4] |
||
983 | bt edx,0 |
||
984 | jnc @f |
||
985 | ror bx,8 |
||
986 | ror ebx,16 |
||
987 | ror bx,8 |
||
988 | @@: |
||
4994 | IgorA | 989 | ret |
990 | |||
991 | align 4 |
||
992 | proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n:dword |
||
993 | mov esi,dword[str2] |
||
994 | mov ecx,dword[n] |
||
995 | mov edi,dword[str1] |
||
996 | stdcall str_len,edi |
||
997 | add edi,eax |
||
998 | cld |
||
999 | repne movsb |
||
1000 | mov byte[edi],0 |
||
1001 | ret |
||
1002 | endp |
||
1003 | |||
1004 | ;output: |
||
1005 | ; eax = strlen |
||
1006 | align 4 |
||
1007 | proc str_len, str1:dword |
||
1008 | mov eax,[str1] |
||
1009 | @@: |
||
1010 | cmp byte[eax],0 |
||
1011 | je @f |
||
1012 | inc eax |
||
1013 | jmp @b |
||
1014 | @@: |
||
1015 | sub eax,[str1] |
||
1016 | ret |
||
1017 | endp |
||
1018 | |||
5008 | IgorA | 1019 | align 4 |
1020 | proc hex_in_str, buf:dword,val:dword,zif:dword |
||
1021 | pushad |
||
1022 | mov edi,dword[buf] |
||
1023 | mov ecx,dword[zif] |
||
1024 | add edi,ecx |
||
1025 | dec edi |
||
1026 | mov ebx,dword[val] |
||
1027 | |||
1028 | .cycle: |
||
1029 | mov al,bl |
||
1030 | and al,0xf |
||
1031 | cmp al,10 |
||
1032 | jl @f |
||
1033 | add al,'a'-'0'-10 |
||
1034 | @@: |
||
1035 | add al,'0' |
||
1036 | mov byte[edi],al |
||
1037 | dec edi |
||
1038 | shr ebx,4 |
||
1039 | loop .cycle |
||
1040 | |||
1041 | popad |
||
1042 | ret |
||
1043 | endp |
||
1044 | |||
4995 | IgorA | 1045 | ;input: |
1046 | ; eax = value |
||
1047 | ; edi = string buffer |
||
1048 | ;output: |
||
1049 | align 4 |
||
1050 | convert_int_to_str: |
||
1051 | pushad |
||
1052 | mov dword[edi+1],0 |
||
1053 | mov dword[edi+5],0 |
||
1054 | call .str |
||
1055 | popad |
||
1056 | ret |
||
1057 | |||
1058 | align 4 |
||
1059 | .str: |
||
1060 | mov ecx,0x0a ;задается система счисления изменяются регистры ebx,eax,ecx,edx входные параметры eax - число |
||
1061 | ;преревод числа в ASCII строку взодные данные ecx=система счисленя edi адрес куда записывать, будем строку, причем конец переменной |
||
1062 | cmp eax,ecx ;сравнить если в eax меньше чем в ecx то перейти на @@-1 т.е. на pop eax |
||
1063 | jb @f |
||
1064 | xor edx,edx ;очистить edx |
||
1065 | div ecx ;разделить - остаток в edx |
||
1066 | push edx ;положить в стек |
||
1067 | ;dec edi ;смещение необходимое для записи с конца строки |
||
1068 | call .str ;перейти на саму себя т.е. вызвать саму себя и так до того момента пока в eax не станет меньше чем в ecx |
||
1069 | pop eax |
||
1070 | @@: ;cmp al,10 ;проверить не меньше ли значение в al чем 10 (для системы счисленя 10 данная команда - лишная)) |
||
1071 | or al,0x30 ;данная команда короче чем две выше |
||
1072 | stosb ;записать элемент из регистра al в ячеку памяти es:edi |
||
1073 | ret ;вернуться чень интересный ход т.к. пока в стеке храниться кол-во вызовов то столько раз мы и будем вызываться |
||
1074 | |||
1075 | |||
1076 | |||
4994 | IgorA | 1077 | align 16 |
1078 | EXPORTS: |
||
1079 | dd sz_exif_get_app1, exif_get_app1 |
||
1080 | dd sz_exif_get_app1_tag, exif_get_app1_tag |
||
5002 | IgorA | 1081 | dd sz_exif_get_app1_child, exif_get_app1_child |
4994 | IgorA | 1082 | dd 0,0 |
1083 | sz_exif_get_app1 db 'exif_get_app1',0 |
||
1084 | sz_exif_get_app1_tag db 'exif_get_app1_tag',0 |
||
5002 | IgorA | 1085 | sz_exif_get_app1_child db 'exif_get_app1_child',01 |