Subversion Repositories Kolibri OS

Rev

Rev 5010 | Rev 6315 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  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. ;---------
  11. offs_m_or_i    equ  8 ;ᬥ饭¨¥ ¯ à ¬¥âà  'MM' ¨«¨ 'II' (Motorola, Intel)
  12. offs_id_gr     equ 10 ;ᬥ饭¨¥ id group
  13. offs_id_gr_mak equ 12 ;ᬥ饭¨¥ id group ¯à®¨§¢®¤¨â¥«ï
  14. offs_tag_0     equ  2 ;ᬥ饭¨¥ 0-£® ⥣ 
  15. tag_size       equ 12 ;à §¬¥à áâàãªâãàë ⥣ 
  16. ;ä®à¬ âë ¤ ­­ëå
  17. tag_format_ui1b  equ  1 ;unsigned integer 1 byte
  18. tag_format_text  equ  2 ;ascii string
  19. tag_format_ui2b  equ  3 ;unsigned integer 2 byte
  20. tag_format_ui4b  equ  4 ;unsigned integer 4 byte
  21. tag_format_urb   equ  5 ;unsigned integer 4/4 byte
  22. tag_format_si1b  equ  6 ;signed integer 1 byte
  23. tag_format_undef equ  7 ;undefined
  24. tag_format_si2b  equ  8 ;signed integer 2 byte
  25. tag_format_si4b  equ  9 ;signed integer 4 byte
  26. tag_format_srb   equ 10 ;signed integer 4/4 byte
  27. tag_format_f4b   equ 11 ;float 4 byte
  28. tag_format_f8b   equ 12 ;float 8 byte
  29.  
  30. align 4
  31. txt_dp db ': ',0
  32. txt_zap db ', ',0
  33. txt_div db '/',0
  34.  
  35. ;§ £®«®¢®ª â ¡«¨æ á £à㯯 ¬¨ ⥣®¢
  36. align 4
  37. exif_tag_numbers:
  38. dd 0,      gr_0    ;£à㯯  app1
  39. dd 0x8769, gr_8769 ;Exif offset
  40. dd 0xa005, gr_a005 ;Interop offset
  41. dd 0x8825, gr_8825 ;GPS info
  42.  
  43. ;£àã¯ë app2 (§¤¥áì ã ª ¦¤®£® ¯à®¨§¢®¤¨â¥«ï ª ¬¥à ᢮© ä®à¬ â ⥣®¢)
  44. dw 0x927c ;app2 ¤«ï Nikon
  45. db 'Ni'
  46. dd gr_927c_Ni
  47.  
  48. dw 0x927c ;app2 ¤«ï Panasonic
  49. db 'Pa'
  50. dd gr_927c_Pa
  51.  
  52. dw 0x927c ;app2 ¤«ï Canon
  53. db 'Ca'
  54. dd gr_927c_Ca
  55. .end:
  56.  
  57. align 4
  58. gr_0:
  59. db 0x00,0x0b,'Processing software',0
  60. db 0x00,0xfe,'Subfile type',0
  61. db 0x00,0xff,'OldSubfile type',0
  62. db 0x01,0x00,'Image width',0
  63. db 0x01,0x01,'Image height',0
  64. db 0x01,0x02,'Bits per sample',0
  65. db 0x01,0x03,'Compression',0
  66. db 0x01,0x06,'Photometric interpretation',0
  67. db 0x01,0x07,'Thresholding',0
  68. db 0x01,0x08,'Cell width',0
  69. db 0x01,0x09,'Cell length',0
  70. db 0x01,0x0a,'Fill order',0
  71. db 0x01,0x0d,'Document name',0
  72. db 0x01,0x0e,'Image description',0
  73. db 0x01,0x0f,'Manufacturer of digicam',0
  74. db 0x01,0x10,'Model',0
  75. db 0x01,0x11,'Strip offsets',0
  76. db 0x01,0x12,'Orientation',0
  77. db 0x01,0x15,'Samples per pixel',0
  78. db 0x01,0x16,'Rows per strip',0
  79. db 0x01,0x17,'Strip byte counts',0
  80. db 0x01,0x18,'Min sample value',0
  81. db 0x01,0x19,'Max sample value',0
  82. db 0x01,0x1a,'X resolution',0
  83. db 0x01,0x1b,'Y resolution',0
  84. db 0x01,0x1c,'Planar configuration',0
  85. db 0x01,0x1d,'Page name',0
  86. db 0x01,0x1e,'X position',0
  87. db 0x01,0x1f,'Y position',0
  88. db 0x01,0x20,'Free offsets',0
  89. db 0x01,0x21,'Free byte counts',0
  90. db 0x01,0x22,'Gray response unit',0
  91. db 0x01,0x23,'Gray response curve',0
  92. db 0x01,0x24,'T4 options',0
  93. db 0x01,0x25,'T6 options',0
  94. db 0x01,0x28,'Resolution unit',0
  95. db 0x01,0x29,'Page number',0
  96. db 0x01,0x2c,'Color response unit',0
  97. db 0x01,0x2d,'Transfer function',0
  98. db 0x01,0x31,'Software',0
  99. db 0x01,0x32,'Modify date',0
  100. db 0x01,0x3b,'Artist',0
  101. db 0x01,0x3c,'Host computer',0
  102. db 0x01,0x3d,'Predictor',0
  103. db 0x01,0x3e,'White point',0
  104. db 0x01,0x3f,'Primary chromaticities',0
  105. db 0x01,0x40,'Color map',0
  106. db 0x01,0x41,'Halftone hints',0
  107. db 0x01,0x42,'Tile width',0
  108. db 0x01,0x43,'Tile length',0
  109. db 0x01,0x44,'Tile offsets',0
  110. db 0x01,0x45,'Tile byte counts',0
  111. db 0x01,0x46,'Bad fax lines',0
  112. db 0x01,0x47,'Clean fax data',0
  113. db 0x01,0x48,'Consecutive bad fax lines',0
  114. db 0x01,0x4a,'Sub IFDs',0
  115. db 0x01,0x4c,'Ink set',0
  116. db 0x01,0x4d,'Ink names',0
  117. db 0x01,0x4e,'Numberof inks',0
  118. db 0x01,0x50,'Dot range',0
  119. db 0x01,0x51,'Target printer',0
  120. db 0x01,0x52,'Extra samples',0
  121. db 0x01,0x53,'Sample format',0
  122. db 0x01,0x54,'SMin sample value',0
  123. db 0x01,0x55,'SMax sample value',0
  124. db 0x01,0x56,'Transfer range',0
  125. db 0x01,0x57,'Clip path',0
  126. db 0x01,0x58,'X clip path units',0
  127. db 0x01,0x59,'Y clip path units',0
  128. db 0x01,0x5a,'Indexed',0
  129. db 0x01,0x5b,'JPEG tables',0
  130. db 0x01,0x5f,'OPIProxy',0
  131. db 0x01,0x90,'Global parameters IFD',0
  132. db 0x01,0x91,'Profile type',0
  133. db 0x01,0x92,'Fax profile',0
  134. db 0x01,0x93,'Coding methods',0
  135. db 0x01,0x94,'Version year',0
  136. db 0x01,0x95,'Mode number',0
  137. db 0x01,0xb1,'Decode',0
  138. db 0x01,0xb2,'Default image color',0
  139. db 0x01,0xb3,'T82 options',0
  140. db 0x01,0xb5,'JPEG tables',0 ;㦥 ¡ë«® ?
  141. db 0x02,0x00,'JPEG proc',0
  142. db 0x02,0x01,'Thumbnail offset',0
  143. db 0x02,0x02,'Thumbnail length',0
  144. db 0x02,0x03,'JPEG restart interval',0
  145. db 0x02,0x05,'JPEG lossless predictors',0
  146. db 0x02,0x06,'JPEG point transforms',0
  147. db 0x02,0x07,'JPEG QTables',0
  148. db 0x02,0x08,'JPEG DCTables',0
  149. db 0x02,0x09,'JPEG ACTables',0
  150. db 0x02,0x11,'YCbCrCoefficients',0
  151. db 0x02,0x12,'YCbCrSubSampling',0
  152. db 0x02,0x13,'YCbCrPositioning',0
  153. db 0x02,0x14,'Reference black white',0
  154. db 0x02,0x2f,'Strip row counts',0
  155. db 0x03,0xe7,'USPTO Miscellaneous',0
  156. db 0x47,0x46,'Rating',0
  157. db 0x47,0x47,'XP_DIP_XML',0
  158. db 0x47,0x48,'Stitch info',0
  159. db 0x47,0x49,'Rating percent',0
  160. db 0x80,0x0d,'Image ID',0
  161. db 0x80,0xa3,'Wang tag 1',0
  162. db 0x80,0xa4,'Wang annotation',0
  163. db 0x80,0xa5,'Wang tag 3',0
  164. db 0x80,0xa6,'Wang tag 4',0
  165. db 0x80,0xe3,'Matteing',0
  166. db 0x80,0xe4,'Data type',0
  167. db 0x80,0xe5,'Image depth',0
  168. db 0x80,0xe6,'Tile depth',0
  169. db 0x82,0x7d,'Model 2',0
  170. db 0x82,0x8d,'CFA repeat pattern dim',0
  171. db 0x82,0x8e,'CFA pattern 2',0
  172. db 0x82,0x8f,'Battery level',0
  173. db 0x82,0x90,'Kodak IFD',0
  174. db 0x82,0x98,'Copyright',0
  175. db 0x82,0xa5,'MD file tag',0
  176. db 0x82,0xa6,'MD scale pixel',0
  177. db 0x82,0xa7,'MD color table',0
  178. db 0x82,0xa8,'MD lab name',0
  179. db 0x82,0xa9,'MD sample info',0
  180. db 0x82,0xaa,'MD prep date',0
  181. db 0x82,0xab,'MD prep time',0
  182. db 0x82,0xac,'MD file units',0
  183. db 0x83,0x0e,'Pixel scale',0
  184. db 0x83,0x35,'Advent scale',0
  185. db 0x83,0x36,'Advent revision',0
  186. db 0x83,0x5c,'UIC1 tag',0
  187. db 0x83,0x5d,'UIC2 tag',0
  188. db 0x83,0x5e,'UIC3 tag',0
  189. db 0x83,0x5f,'UIC4 tag',0
  190. db 0x83,0xbb,'IPTC-NAA',0
  191. db 0x84,0x7e,'Intergraph packet data',0
  192. db 0x84,0x7f,'Intergraph flag registers',0
  193. db 0x84,0x80,'Intergraph matrix',0
  194. db 0x84,0x81,'INGR reserved',0
  195. db 0x84,0x82,'Model tie point',0
  196. db 0x84,0xe0,'Site',0
  197. db 0x84,0xe1,'Color sequence',0
  198. db 0x84,0xe2,'IT8 header',0
  199. db 0x84,0xe3,'Raster padding',0
  200. db 0x84,0xe4,'Bits per run length',0
  201. db 0x84,0xe5,'Bits per extended run length',0
  202. db 0x84,0xe6,'Color table',0
  203. db 0x84,0xe7,'Image color indicator',0
  204. db 0x84,0xe8,'Background color indicator',0
  205. db 0x84,0xe9,'Image color value',0
  206. db 0x84,0xea,'Background color value',0
  207. db 0x84,0xeb,'Pixel intensity range',0
  208. db 0x84,0xec,'Transparency indicator',0
  209. db 0x84,0xed,'Color characterization',0
  210. db 0x84,0xee,'HCUsage',0
  211. db 0x84,0xef,'Trap indicator',0
  212. db 0x84,0xf0,'CMYK equivalent',0
  213. db 0x85,0x46,'SEM info',0
  214. db 0x85,0x68,'AFCP_IPTC',0
  215. db 0x85,0xb8,'Pixel magic JBIG options',0
  216. db 0x85,0xd8,'Model transform',0
  217. db 0x86,0x02,'WB_GRGB levels',0
  218. db 0x86,0x06,'Leaf data',0
  219. db 0x86,0x49,'Photoshop settings',0
  220. db 0x87,0x69,'Exif offset',0
  221. db 0x87,0x73,'ICC_Profile',0
  222. db 0x87,0x7f,'TIFF_FX extensions',0
  223. db 0x87,0x80,'Multi profiles',0
  224. db 0x87,0x81,'Shared data',0
  225. db 0x87,0x82,'T88 options',0
  226. db 0x87,0xac,'Image layer',0
  227. db 0x87,0xaf,'Geo tiff directory',0
  228. db 0x87,0xb0,'Geo tiff double params',0
  229. db 0x87,0xb1,'Geo tiff ascii params',0
  230. db 0x88,0x25,'GPS info',0
  231. db 0x88,0x28,'Opto-Electric conv factor',0
  232. db 0x88,0x29,'Interlace',0
  233. db 0x88,0x5c,'Fax recv params',0
  234. db 0x88,0x5d,'Fax sub address',0
  235. db 0x88,0x5e,'Fax recv time',0
  236. db 0x88,0x8a,'Leaf sub IFD',0
  237. db 0x92,0x0b,'Flash energy',0
  238. db 0x92,0x0c,'Spatial frequency response',0
  239. db 0x92,0x0d,'Noise',0
  240. db 0x92,0x0e,'Focal plane X resolution',0
  241. db 0x92,0x0f,'Focal plane Y resolution',0
  242. db 0x92,0x10,'Focal plane resolution unit',0
  243. db 0x92,0x15,'Exposure index',0
  244. db 0x92,0x16,'TIFF-EP standard ID',0
  245. db 0x92,0x17,'Sensing method',0
  246. db 0x92,0x3a,'CIP3 data file',0
  247. db 0x92,0x3b,'CIP3 sheet',0
  248. db 0x92,0x3c,'CIP3 side',0
  249. db 0x92,0x3f,'Sto nits',0
  250. db 0x93,0x2f,'MS document text',0
  251. db 0x93,0x30,'MS property set storage',0
  252. db 0x93,0x31,'MS document text position',0
  253. db 0x93,0x5c,'Image source data',0
  254. db 0x9c,0x9b,'XP title',0
  255. db 0x9c,0x9c,'XP comment',0
  256. db 0x9c,0x9d,'XP author',0
  257. db 0x9c,0x9e,'XP keywords',0
  258. db 0x9c,0x9f,'XP subject',0
  259. db 0xa2,0x0c,'Spatial frequency fesponse',0
  260. db 0xa2,0x0d,'Noise',0
  261. db 0xa2,0x11,'Image number',0
  262. db 0xa2,0x12,'Security classification',0
  263. db 0xa2,0x13,'Image history',0
  264. db 0xa2,0x16,'TIFF-EP standard ID',0
  265. db 0xa4,0x80,'GDAL metadata',0
  266. db 0xa4,0x81,'GDAL no data',0
  267. db 0xaf,0xc0,'Expand software',0
  268. db 0xaf,0xc1,'Expand lens',0
  269. db 0xaf,0xc2,'Expand film',0
  270. db 0xaf,0xc3,'Expand filterLens',0
  271. db 0xaf,0xc4,'Expand scanner',0
  272. db 0xaf,0xc5,'Expand flash lamp',0
  273. db 0xbc,0x01,'Pixel format',0
  274. db 0xbc,0x02,'Transformation',0
  275. db 0xbc,0x03,'Uncompressed',0
  276. db 0xbc,0x04,'Image type',0
  277. db 0xbc,0x80,'Image width',0
  278. db 0xbc,0x81,'Image height',0
  279. db 0xbc,0x82,'Width resolution',0
  280. db 0xbc,0x83,'Height resolution',0
  281. db 0xbc,0xc0,'Image offset',0
  282. db 0xbc,0xc1,'Image byte count',0
  283. db 0xbc,0xc2,'Alpha offset',0
  284. db 0xbc,0xc3,'Alpha byte count',0
  285. db 0xbc,0xc4,'Image data discard',0
  286. db 0xbc,0xc5,'Alpha data discard',0
  287. db 0xc4,0x27,'Oce scanjob desc',0
  288. db 0xc4,0x28,'Oce application selector',0
  289. db 0xc4,0x29,'Oce ID number',0
  290. db 0xc4,0x2a,'Oce image logic',0
  291. db 0xc4,0x4f,'Annotations',0
  292. db 0xc4,0xa5,'Print IM',0
  293. db 0xc5,0x73,'Original file name',0
  294. db 0xc5,0x80,'USPTO original content type',0
  295. db 0xc6,0x12,'DNG version',0
  296. db 0xc6,0x13,'DNG backward version',0
  297. db 0xc6,0x14,'Unique camera model',0
  298. db 0xc6,0x15,'Localized camera model',0
  299. db 0xc6,0x16,'CFA plane color',0
  300. db 0xc6,0x17,'CFA layout',0
  301. db 0xc6,0x18,'Linearization table',0
  302. db 0xc6,0x19,'Black level repeat dim',0
  303. db 0xc6,0x1a,'Black level',0
  304. db 0xc6,0x1b,'Black level delta H',0
  305. db 0xc6,0x1c,'Black level delta V',0
  306. db 0xc6,0x1d,'White level',0
  307. db 0xc6,0x1e,'Default scale',0
  308. db 0xc6,0x1f,'Default crop origin',0
  309. db 0xc6,0x20,'Default crop size',0
  310. db 0xc6,0x21,'Color matrix 1',0
  311. db 0xc6,0x22,'Color matrix 2',0
  312. db 0xc6,0x23,'Camera calibration 1',0
  313. db 0xc6,0x24,'Camera calibration 2',0
  314. db 0xc6,0x25,'Reduction matrix 1',0
  315. db 0xc6,0x26,'Reduction matrix 2',0
  316. db 0xc6,0x27,'Analog balance',0
  317. db 0xc6,0x28,'As shot neutral',0
  318. db 0xc6,0x29,'As shot white XY',0
  319. db 0xc6,0x2a,'BaselineExposure',0
  320. db 0xc6,0x2b,'BaselineNoise',0
  321. db 0xc6,0x2c,'BaselineSharpness',0
  322. db 0xc6,0x2d,'BayerGreenSplit',0
  323. db 0xc6,0x2e,'Linear response limit',0
  324. db 0xc6,0x2f,'Camera serial number',0
  325. db 0xc6,0x30,'DNG lens info',0
  326. db 0xc6,0x31,'Chroma blur radius',0
  327. db 0xc6,0x32,'Anti alias strength',0
  328. db 0xc6,0x33,'Shadow scale',0
  329. db 0xc6,0x34,'SR2 private',0
  330. db 0xc6,0x35,'Maker note safety',0
  331. db 0xc6,0x40,'Raw image segmentation',0
  332. db 0xc6,0x5a,'Calibration illuminant 1',0
  333. db 0xc6,0x5b,'Calibration illuminant 2',0
  334. db 0xc6,0x5c,'Best quality scale',0
  335. db 0xc6,0x5d,'Raw data unique ID',0
  336. db 0xc6,0x60,'Alias layer metadata',0
  337. db 0xc6,0x8b,'Original raw file name',0
  338. db 0xc6,0x8c,'Original raw file data',0
  339. db 0xc6,0x8d,'Active area',0
  340. db 0xc6,0x8e,'Masked areas',0
  341. db 0xc6,0x8f,'AsShot ICC profile',0
  342. db 0xc6,0x90,'AsShot pre profile matrix',0
  343. db 0xc6,0x91,'Current ICC profile',0
  344. db 0xc6,0x92,'Current pre profile matrix',0
  345. db 0xc6,0xbf,'Colorimetric reference',0
  346. db 0xc6,0xd2,'Panasonic title',0
  347. db 0xc6,0xd3,'Panasonic title 2',0
  348. db 0xc6,0xf3,'Camera calibration sig',0
  349. db 0xc6,0xf4,'Profile calibration sig',0
  350. db 0xc6,0xf5,'Profile IFD',0
  351. db 0xc6,0xf6,'AsShot profile name',0
  352. db 0xc6,0xf7,'Noise reduction applied',0
  353. db 0xc6,0xf8,'Profile name',0
  354. db 0xc6,0xf9,'Profile hue sat map dims',0
  355. db 0xc6,0xfa,'Profile hue sat map data 1',0
  356. db 0xc6,0xfb,'Profile hue sat map data 2',0
  357. db 0xc6,0xfc,'Profile tone curve',0
  358. db 0xc6,0xfd,'Profile embed policy',0
  359. db 0xc6,0xfe,'Profile copyright',0
  360. db 0xc7,0x14,'Forward matrix 1',0
  361. db 0xc7,0x15,'Forward matrix 2',0
  362. db 0xc7,0x16,'Preview application name',0
  363. db 0xc7,0x17,'Preview application version',0
  364. db 0xc7,0x18,'Preview settings name',0
  365. db 0xc7,0x19,'Preview settings digest',0
  366. db 0xc7,0x1a,'Preview color space',0
  367. db 0xc7,0x1b,'Preview date time',0
  368. db 0xc7,0x1c,'Raw image digest',0
  369. db 0xc7,0x1d,'Original raw file digest',0
  370. db 0xc7,0x1e,'Sub tile block size',0
  371. db 0xc7,0x1f,'Row interleave factor',0
  372. db 0xc7,0x25,'Profile look table dims',0
  373. db 0xc7,0x26,'Profile look table data',0
  374. db 0xc7,0x40,'Opcode list 1',0
  375. db 0xc7,0x41,'Opcode list 2',0
  376. db 0xc7,0x4e,'Opcode list 3',0
  377. db 0xc7,0x61,'Noise profile',0
  378. db 0xc7,0x63,'Time codes',0
  379. db 0xc7,0x64,'Frame rate',0
  380. db 0xc7,0x72,'TStop',0
  381. db 0xc7,0x89,'Reel name',0
  382. db 0xc7,0x91,'Original default final size',0
  383. db 0xc7,0x92,'Original best quality size',0
  384. db 0xc7,0x93,'Original default crop size',0
  385. db 0xc7,0xa1,'Camera label',0
  386. db 0xc7,0xa3,'Profile hue sat map encoding',0
  387. db 0xc7,0xa4,'Profile look table encoding',0
  388. db 0xc7,0xa5,'Baseline exposure offset',0
  389. db 0xc7,0xa6,'Default black render',0
  390. db 0xc7,0xa7,'New raw image digest',0
  391. db 0xc7,0xa8,'Raw to preview gain',0
  392. db 0xc7,0xb5,'Default user crop',0
  393. db 0xfe,0x00,'KDC_IFD',0
  394.  
  395. dd 0
  396.  
  397. align 4
  398. gr_8769:
  399. db 0x02,0xbc,'Application notes',0
  400. db 0x82,0x9a,'Exposure time',0
  401. db 0x82,0x9d,'F number',0
  402. db 0x88,0x22,'Exposure program',0
  403. db 0x88,0x24,'Spectral sensitivity',0
  404. db 0x88,0x27,'ISO',0
  405. db 0x88,0x2a,'Time zone offset',0
  406. db 0x88,0x2b,'Self timer mode',0
  407. db 0x88,0x30,'Sensitivity type',0
  408. db 0x88,0x31,'Standard output sensitivity',0
  409. db 0x88,0x32,'Recommended exposure index',0
  410. db 0x88,0x33,'ISO speed',0
  411. db 0x88,0x34,'ISO speed latitude yyy',0
  412. db 0x88,0x35,'ISO speed latitude zzz',0
  413. db 0x90,0x00,'Exif version',0
  414. db 0x90,0x03,'Date time original',0
  415. db 0x90,0x04,'Create date',0
  416. db 0x91,0x01,'Components configuration',0
  417. db 0x91,0x02,'Compressed bits per pixel',0
  418. db 0x92,0x01,'Shutter speed value',0
  419. db 0x92,0x02,'Aperture value',0
  420. db 0x92,0x03,'Brightness value',0
  421. db 0x92,0x04,'Exposure compensation',0
  422. db 0x92,0x05,'Max aperture value',0
  423. db 0x92,0x06,'Subject distance',0
  424. db 0x92,0x07,'Metering mode',0
  425. db 0x92,0x08,'Light source',0
  426. db 0x92,0x09,'Flash',0
  427. db 0x92,0x0a,'Focal length',0
  428. db 0x92,0x11,'Image number',0
  429. db 0x92,0x12,'Security classification',0
  430. db 0x92,0x13,'Image history',0
  431. db 0x92,0x14,'Subject area',0
  432. db 0x92,0x7c,'Maker note',0
  433. db 0x92,0x86,'User comment',0
  434. db 0x92,0x90,'Sub sec time',0
  435. db 0x92,0x91,'Sub sec time original',0
  436. db 0x92,0x92,'Sub sec time digitized',0
  437. db 0xa0,0x00,'Flashpix version',0
  438. db 0xa0,0x01,'Color space',0
  439. db 0xa0,0x02,'Exif image width',0
  440. db 0xa0,0x03,'Exif image height',0
  441. db 0xa0,0x04,'Related sound file',0
  442. db 0xa0,0x05,'Interop offset',0
  443. db 0xa2,0x0b,'Flash energy',0
  444. db 0xa2,0x0e,'Focal plane X resolution',0
  445. db 0xa2,0x0f,'Focal plane Y resolution',0
  446. db 0xa2,0x10,'Focal plane resolution unit',0
  447. db 0xa2,0x14,'Subject location',0
  448. db 0xa2,0x15,'Exposure index',0
  449. db 0xa2,0x17,'Sensing method',0
  450. db 0xa3,0x00,'File source',0
  451. db 0xa3,0x01,'Scene type',0
  452. db 0xa3,0x02,'CFA pattern',0
  453. db 0xa4,0x01,'Custom rendered',0
  454. db 0xa4,0x02,'Exposure mode',0
  455. db 0xa4,0x03,'White balance',0
  456. db 0xa4,0x04,'Digital zoom ratio',0
  457. db 0xa4,0x05,'Focal length in 35mm format',0
  458. db 0xa4,0x06,'Scene capture type',0
  459. db 0xa4,0x07,'Gain control',0
  460. db 0xa4,0x08,'Contrast',0
  461. db 0xa4,0x09,'Saturation',0
  462. db 0xa4,0x0a,'Sharpness',0
  463. db 0xa4,0x0b,'Device setting description',0
  464. db 0xa4,0x0c,'Subject distance range',0
  465. db 0xa4,0x20,'Image unique ID',0
  466. db 0xa4,0x30,'Owner name',0
  467. db 0xa4,0x31,'Serial number',0
  468. db 0xa4,0x32,'Lens info',0
  469. db 0xa4,0x33,'Lens make',0
  470. db 0xa4,0x34,'Lens model',0
  471. db 0xa4,0x35,'Lens serial number',0
  472. db 0xa5,0x00,'Gamma',0
  473. db 0xea,0x1c,'Padding',0
  474. db 0xea,0x1d,'Offset schema',0
  475. db 0xfd,0xe8,'Owner name',0
  476. db 0xfd,0xe9,'Serial number',0
  477. db 0xfd,0xea,'Lens',0
  478. db 0xfe,0x4c,'Raw file',0
  479. db 0xfe,0x4d,'Converter',0
  480. db 0xfe,0x4e,'White balance',0
  481. db 0xfe,0x51,'Exposure',0
  482. db 0xfe,0x52,'Shadows',0
  483. db 0xfe,0x53,'Brightness',0
  484. db 0xfe,0x54,'Contrast',0
  485. db 0xfe,0x55,'Saturation',0
  486. db 0xfe,0x56,'Sharpness',0
  487. db 0xfe,0x57,'Smoothness',0
  488. db 0xfe,0x58,'Moire filter',0
  489.  
  490. dd 0
  491.  
  492. align 4
  493. gr_a005:
  494. db 0x00,0x01,'Interop index',0
  495. db 0x00,0x02,'Interop version',0
  496. db 0x10,0x00,'Related image file format',0
  497. db 0x10,0x01,'Related image width',0
  498. db 0x10,0x02,'Related image height',0
  499. dd 0
  500.  
  501. align 4
  502. gr_8825:
  503. db 0x00,0x00,'GPS version ID',0
  504. db 0x00,0x01,'GPS latitude ref',0
  505. db 0x00,0x02,'GPS latitude',0
  506. db 0x00,0x03,'GPS longitude ref',0
  507. db 0x00,0x04,'GPS longitude',0
  508. db 0x00,0x05,'GPS altitude ref',0
  509. db 0x00,0x06,'GPS altitude',0
  510. db 0x00,0x07,'GPS time stamp',0
  511. db 0x00,0x08,'GPS satellites',0
  512. db 0x00,0x09,'GPS status',0
  513. db 0x00,0x0a,'GPS measuremode',0
  514. db 0x00,0x0b,'GPS dop',0
  515. db 0x00,0x0c,'GPS speed ref',0
  516. db 0x00,0x0d,'GPS speed',0
  517. db 0x00,0x0e,'GPS track ref',0
  518. db 0x00,0x0f,'GPS track',0
  519. db 0x00,0x10,'GPS img direction ref',0
  520. db 0x00,0x11,'GPS img direction',0
  521. db 0x00,0x12,'GPS map datum',0
  522. db 0x00,0x13,'GPS dest latitude ref',0
  523. db 0x00,0x14,'GPS dest latitude',0
  524. db 0x00,0x15,'GPS dest longitude ref',0
  525. db 0x00,0x16,'GPS dest longitude',0
  526. db 0x00,0x17,'GPS dest bearing ref',0
  527. db 0x00,0x18,'GPS dest bearing',0
  528. db 0x00,0x19,'GPS dest distance ref',0
  529. db 0x00,0x1a,'GPS dest distance',0
  530. db 0x00,0x1b,'GPS processing method',0
  531. db 0x00,0x1c,'GPS area information',0
  532. db 0x00,0x1d,'GPS date stamp',0
  533. db 0x00,0x1e,'GPS differential',0
  534. db 0x00,0x1f,'GPS h positioning error',0
  535.  
  536. dd 0
  537.  
  538. ;¤ ­­ë¥ app2 ¤«ï Nikon
  539. align 4
  540. gr_927c_Ni:
  541. db 0x00,0x01,'MakerNoteVersion',0
  542. db 0x00,0x02,'ISO',0
  543. db 0x00,0x03,'ColorMode',0
  544. db 0x00,0x04,'Quality',0
  545. db 0x00,0x05,'WhiteBalance',0
  546. db 0x00,0x06,'Sharpness',0
  547. db 0x00,0x07,'FocusMode',0
  548. db 0x00,0x08,'FlashSetting',0
  549. db 0x00,0x09,'FlashType',0
  550. db 0x00,0x0b,'WhiteBalanceFineTune',0
  551. db 0x00,0x0c,'WB_RBLevels',0
  552. db 0x00,0x0d,'ProgramShift',0
  553. db 0x00,0x0e,'ExposureDifference',0
  554. db 0x00,0x0f,'ISOSelection',0
  555. db 0x00,0x10,'DataDump',0
  556. db 0x00,0x11,'PreviewIFD',0
  557. db 0x00,0x12,'FlashExposureComp',0
  558. db 0x00,0x13,'ISOSetting',0
  559. db 0x00,0x14,'ColorBalanceA ',0
  560. db 0x00,0x16,'ImageBoundary',0
  561. db 0x00,0x17,'ExternalFlashExposureComp',0
  562. db 0x00,0x18,'FlashExposureBracketValue',0
  563. db 0x00,0x19,'ExposureBracketValue',0
  564. db 0x00,0x1a,'ImageProcessing',0
  565. db 0x00,0x1b,'CropHiSpeed',0
  566. db 0x00,0x1c,'ExposureTuning',0
  567. db 0x00,0x1d,'SerialNumber',0
  568. db 0x00,0x1e,'ColorSpace',0
  569. db 0x00,0x1f,'VRInfo',0
  570. db 0x00,0x20,'ImageAuthentication',0
  571. db 0x00,0x21,'FaceDetect',0
  572. db 0x00,0x22,'ActiveD-Lighting',0
  573. db 0x00,0x23,'PictureControlData',0
  574. db 0x00,0x24,'WorldTime',0
  575. db 0x00,0x25,'ISOInfo',0
  576. db 0x00,0x2a,'VignetteControl',0
  577. db 0x00,0x2b,'DistortInfo',0
  578. db 0x00,0x2c,'UnknownInfo',0
  579. db 0x00,0x32,'UnknownInfo2',0
  580. db 0x00,0x35,'HDRInfo',0
  581. db 0x00,0x39,'LocationInfo',0
  582. db 0x00,0x3d,'BlackLevel',0
  583. db 0x00,0x80,'ImageAdjustment',0
  584. db 0x00,0x81,'ToneComp',0
  585. db 0x00,0x82,'AuxiliaryLens',0
  586. db 0x00,0x83,'LensType',0
  587. db 0x00,0x84,'Lens',0
  588. db 0x00,0x85,'ManualFocusDistance',0
  589. db 0x00,0x86,'DigitalZoom',0
  590. db 0x00,0x87,'FlashMode',0
  591. db 0x00,0x88,'AFInfo',0
  592. db 0x00,0x89,'ShootingMode',0
  593. db 0x00,0x8b,'LensFStops',0
  594. db 0x00,0x8c,'ContrastCurve',0
  595. db 0x00,0x8d,'ColorHue',0
  596. db 0x00,0x8f,'SceneMode',0
  597. db 0x00,0x90,'LightSource',0
  598. db 0x00,0x91,'ShotInfo',0
  599. db 0x00,0x92,'HueAdjustment',0
  600. db 0x00,0x93,'NEFCompression',0
  601. db 0x00,0x94,'Saturation',0
  602. db 0x00,0x95,'NoiseReduction',0
  603. db 0x00,0x96,'NEFLinearizationTable',0
  604. db 0x00,0x97,'ColorBalance',0
  605. db 0x00,0x98,'LensData',0
  606. db 0x00,0x99,'RawImageCenter',0
  607. db 0x00,0x9a,'SensorPixelSize',0
  608. db 0x00,0x9c,'SceneAssist',0
  609. db 0x00,0x9e,'RetouchHistory',0
  610. db 0x00,0xa0,'SerialNumber',0
  611. db 0x00,0xa2,'ImageDataSize',0
  612. db 0x00,0xa5,'ImageCount',0
  613. db 0x00,0xa6,'DeletedImageCount',0
  614. db 0x00,0xa7,'ShutterCount',0
  615. db 0x00,0xa8,'FlashInfo',0
  616. db 0x00,0xa9,'ImageOptimization',0
  617. db 0x00,0xaa,'Saturation',0
  618. db 0x00,0xab,'VariProgram',0
  619. db 0x00,0xac,'ImageStabilization',0
  620. db 0x00,0xad,'AFResponse',0
  621. db 0x00,0xb0,'MultiExposure',0
  622. db 0x00,0xb1,'HighISONoiseReduction',0
  623. db 0x00,0xb3,'ToningEffect',0
  624. db 0x00,0xb6,'PowerUpTime',0
  625. db 0x00,0xb7,'AFInfo2',0
  626. db 0x00,0xb8,'FileInfo',0
  627. db 0x00,0xb9,'AFTune',0
  628. db 0x00,0xbd,'PictureControlData',0
  629. db 0x00,0xc3,'BarometerInfo',0
  630. db 0x0e,0x00,'PrintIM',0
  631. db 0x0e,0x01,'NikonCaptureData',0
  632. db 0x0e,0x09,'NikonCaptureVersion',0
  633. db 0x0e,0x0e,'NikonCaptureOffsets',0
  634. db 0x0e,0x10,'NikonScanIFD',0
  635. db 0x0e,0x13,'NikonCaptureEditVersions ',0
  636. db 0x0e,0x1d,'NikonICCProfile',0
  637. db 0x0e,0x1e,'NikonCaptureOutput',0
  638. db 0x0e,0x22,'NEFBitDepth',0
  639.  
  640. dd 0
  641.  
  642. ;¤ ­­ë¥ app2 ¤«ï Panasonic
  643. align 4
  644. gr_927c_Pa:
  645. db 0x00,0x01,'ImageQuality',0
  646. db 0x00,0x02,'FirmwareVersion',0
  647. db 0x00,0x03,'WhiteBalance',0
  648. db 0x00,0x07,'FocusMode',0
  649. db 0x00,0x0f,'AFAreaMode',0
  650. db 0x00,0x1a,'ImageStabilization',0
  651. db 0x00,0x1c,'MacroMode',0
  652. db 0x00,0x1f,'ShootingMode',0
  653. db 0x00,0x20,'Audio',0
  654. db 0x00,0x21,'DataDump',0
  655. db 0x00,0x23,'WhiteBalanceBias',0
  656. db 0x00,0x24,'FlashBias',0
  657. db 0x00,0x25,'InternalSerialNumber',0
  658. db 0x00,0x26,'PanasonicExifVersion',0
  659. db 0x00,0x28,'ColorEffect',0
  660. db 0x00,0x29,'TimeSincePowerOn',0
  661. db 0x00,0x2a,'BurstMode',0
  662. db 0x00,0x2b,'SequenceNumber',0
  663. db 0x00,0x2c,'ContrastMode',0
  664. db 0x00,0x2d,'NoiseReduction',0
  665. db 0x00,0x2e,'SelfTimer',0
  666. db 0x00,0x30,'Rotation',0
  667. db 0x00,0x31,'AFAssistLamp',0
  668. db 0x00,0x32,'ColorMode',0
  669. db 0x00,0x33,'BabyAge',0
  670. db 0x00,0x34,'OpticalZoomMode',0
  671. db 0x00,0x35,'ConversionLens',0
  672. db 0x00,0x36,'TravelDay',0
  673. db 0x00,0x39,'Contrast',0
  674. db 0x00,0x3a,'WorldTimeLocation',0
  675. db 0x00,0x3b,'TextStamp',0
  676. db 0x00,0x3c,'ProgramISO',0
  677. db 0x00,0x3d,'AdvancedSceneType',0
  678. db 0x00,0x3f,'FacesDetected',0
  679. db 0x00,0x40,'Saturation',0
  680. db 0x00,0x41,'Sharpness',0
  681. db 0x00,0x42,'FilmMode',0
  682. db 0x00,0x44,'ColorTempKelvin',0
  683. db 0x00,0x45,'BracketSettings',0
  684. db 0x00,0x46,'WBShiftAB',0
  685. db 0x00,0x47,'WBShiftGM',0
  686. db 0x00,0x48,'FlashCurtain',0
  687. db 0x00,0x49,'LongExposureNoiseReduction',0
  688. db 0x00,0x4b,'PanasonicImageWidth',0
  689. db 0x00,0x4c,'PanasonicImageHeight',0
  690. db 0x00,0x4d,'AFPointPosition',0
  691. db 0x00,0x51,'LensType',0
  692. db 0x00,0x52,'LensSerialNumber',0
  693. db 0x00,0x53,'AccessoryType',0
  694. db 0x00,0x54,'AccessorySerialNumber',0
  695. db 0x00,0x59,'Transform',0
  696. db 0x00,0x5d,'IntelligentExposure',0
  697. db 0x00,0x60,'LensFirmwareVersion',0
  698. db 0x00,0x61,'FaceRecInfo',0
  699. db 0x00,0x62,'FlashWarning',0
  700. db 0x00,0x63,'RecognizedFaceFlags',0
  701. db 0x00,0x65,'Title',0
  702. db 0x00,0x66,'BabyName',0
  703. db 0x00,0x67,'Location',0
  704. db 0x00,0x69,'Country',0
  705. db 0x00,0x6b,'State',0
  706. db 0x00,0x6d,'City',0
  707. db 0x00,0x6f,'Landmark',0
  708. db 0x00,0x70,'IntelligentResolution',0
  709. db 0x00,0x77,'BurstSpeed',0
  710. db 0x00,0x79,'IntelligentD-Range',0
  711. db 0x00,0x7c,'ClearRetouch',0
  712. db 0x00,0x86,'ManometerPressure',0
  713. db 0x00,0x89,'PhotoStyle',0
  714. db 0x00,0x8a,'ShadingCompensation',0
  715. db 0x00,0x8c,'AccelerometerZ',0
  716. db 0x00,0x8d,'AccelerometerX',0
  717. db 0x00,0x8e,'AccelerometerY',0
  718. db 0x00,0x8f,'CameraOrientation',0
  719. db 0x00,0x90,'RollAngle',0
  720. db 0x00,0x91,'PitchAngle',0
  721. db 0x00,0x93,'SweepPanoramaDirection',0
  722. db 0x00,0x94,'SweepPanoramaFieldOfView',0
  723. db 0x00,0x96,'TimerRecording',0
  724. db 0x00,0x9d,'InternalNDFilter',0
  725. db 0x00,0x9e,'HDR',0
  726. db 0x00,0x9f,'ShutterType',0
  727. db 0x00,0xa3,'ClearRetouchValue',0
  728. db 0x00,0xab,'TouchAE',0
  729. db 0x0e,0x00,'PrintIM',0
  730. db 0x80,0x00,'MakerNoteVersion',0
  731. db 0x80,0x01,'SceneMode',0
  732. db 0x80,0x04,'WBRedLevel',0
  733. db 0x80,0x05,'WBGreenLevel',0
  734. db 0x80,0x06,'WBBlueLevel',0
  735. db 0x80,0x07,'FlashFired',0
  736. db 0x80,0x08,'TextStamp',0
  737. db 0x80,0x09,'TextStamp',0
  738. db 0x80,0x10,'BabyAge',0
  739. db 0x80,0x12,'Transform',0
  740.  
  741. dd 0
  742.  
  743. ;¤ ­­ë¥ app2 ¤«ï Canon
  744. align 4
  745. gr_927c_Ca:
  746. db 0x00,0x01,'CanonCameraSettings',0
  747. db 0x00,0x02,'CanonFocalLength',0
  748. db 0x00,0x03,'CanonFlashInfo?',0
  749. db 0x00,0x04,'CanonShotInfo',0
  750. db 0x00,0x05,'CanonPanorama',0
  751. db 0x00,0x06,'CanonImageType',0
  752. db 0x00,0x07,'CanonFirmwareVersion',0
  753. db 0x00,0x08,'FileNumber',0
  754. db 0x00,0x09,'OwnerName',0
  755. db 0x00,0x0a,'UnknownD30',0
  756. db 0x00,0x0c,'SerialNumber',0
  757. db 0x00,0x0d,'CanonCameraInfo',0
  758. db 0x00,0x0e,'CanonFileLength',0
  759. db 0x00,0x0f,'CustomFunctions',0
  760. db 0x00,0x10,'CanonModelID',0
  761. db 0x00,0x11,'MovieInfo',0
  762. db 0x00,0x12,'CanonAFInfo',0
  763. db 0x00,0x13,'ThumbnailImageValidArea',0
  764. db 0x00,0x15,'SerialNumberFormat',0
  765. db 0x00,0x1a,'SuperMacro',0
  766. db 0x00,0x1c,'DateStampMode',0
  767. db 0x00,0x1d,'MyColors',0
  768. db 0x00,0x1e,'FirmwareRevision',0
  769. db 0x00,0x23,'Categories',0
  770. db 0x00,0x24,'FaceDetect1',0
  771. db 0x00,0x25,'FaceDetect2',0
  772. db 0x00,0x26,'CanonAFInfo2',0
  773. db 0x00,0x27,'ContrastInfo',0
  774. db 0x00,0x28,'ImageUniqueID',0
  775. db 0x00,0x2f,'FaceDetect3',0
  776. db 0x00,0x35,'TimeInfo',0
  777. db 0x00,0x81,'RawDataOffset',0
  778. db 0x00,0x83,'OriginalDecisionDataOffset',0
  779. db 0x00,0x90,'CustomFunctions1D',0
  780. db 0x00,0x91,'PersonalFunctions',0
  781. db 0x00,0x92,'PersonalFunctionValues',0
  782. db 0x00,0x93,'CanonFileInfo',0
  783. db 0x00,0x94,'AFPointsInFocus1D',0
  784. db 0x00,0x95,'LensModel',0
  785. db 0x00,0x96,'SerialInfo ',0
  786. db 0x00,0x97,'DustRemovalData',0
  787. db 0x00,0x98,'CropInfo',0
  788. db 0x00,0x99,'CustomFunctions2',0
  789. db 0x00,0x9a,'AspectInfo',0
  790. db 0x00,0xa0,'ProcessingInfo',0
  791. db 0x00,0xa1,'ToneCurveTable',0
  792. db 0x00,0xa2,'SharpnessTable',0
  793. db 0x00,0xa3,'SharpnessFreqTable',0
  794. db 0x00,0xa4,'WhiteBalanceTable',0
  795. db 0x00,0xa9,'ColorBalance',0
  796. db 0x00,0xaa,'MeasuredColor',0
  797. db 0x00,0xae,'ColorTemperature',0
  798. db 0x00,0xb0,'CanonFlags',0
  799. db 0x00,0xb1,'ModifiedInfo',0
  800. db 0x00,0xb2,'ToneCurveMatching',0
  801. db 0x00,0xb3,'WhiteBalanceMatching',0
  802. db 0x00,0xb4,'ColorSpace',0
  803. db 0x00,0xb6,'PreviewImageInfo',0
  804. db 0x00,0xd0,'VRDOffset',0
  805. db 0x00,0xe0,'SensorInfo',0
  806. db 0x40,0x01,'ColorData',0
  807. db 0x40,0x02,'CRWParam?',0
  808. db 0x40,0x03,'ColorInfo',0
  809. db 0x40,0x05,'Flavor?',0
  810. db 0x40,0x08,'BlackLevel?',0
  811. db 0x40,0x10,'CustomPictureStyleFileName',0
  812. db 0x40,0x13,'AFMicroAdj',0
  813. db 0x40,0x15,'VignettingCorr ',0
  814. db 0x40,0x16,'VignettingCorr2',0
  815. db 0x40,0x18,'LightingOpt',0
  816. db 0x40,0x19,'LensInfo',0
  817. db 0x40,0x20,'AmbienceInfo',0
  818. db 0x40,0x24,'FilterInfo',0
  819.  
  820. dd 0
  821.  
  822. ;input:
  823. ; bof - 㪠§ â¥«ì ­  ­ ç «® ä ©« 
  824. ; app1 - 㪠§ â¥«ì ¤«ï § ¯®«­¥­¨ï exif.app1
  825. ;output:
  826. ; app1 - 㪠§ â¥«ì ­  ­ ç «® exif.app1 (¨«¨ 0 ¥á«¨ ­¥ ­ ©¤¥­® ¨«¨ ä®à¬ â ä ©«  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï)
  827. align 4
  828. proc exif_get_app1 uses eax ebx edi, bof:dword, app1:dword
  829.         mov eax,[bof]
  830.         mov edi,[app1]
  831.  
  832.         ;ä ©« ¢ ä®à¬ â¥ jpg?
  833.         cmp word[eax],0xd8ff
  834.         jne .no_exif
  835.         add eax,2
  836.  
  837.         ;ä ©« ᮤ¥à¦¨â exif.app0?
  838.         cmp word[eax],0xe0ff
  839.         jne @f
  840.                 add eax,2
  841.                 movzx ebx,word[eax]
  842.                 ror bx,8 ;¢á¥£¤  «¨ â ª ­ ¤®?
  843.                 add eax,ebx
  844.         @@:
  845.  
  846.         ;ä ©« ᮤ¥à¦¨â exif.app1?
  847.         cmp word[eax],0xe1ff
  848.         jne .no_exif
  849.  
  850.         xor ebx,ebx
  851.         cmp word[eax+10],'II'
  852.         je @f
  853.                 inc ebx ;if 'MM' edx=1
  854.         @@:
  855.         mov word[edi+offs_m_or_i],bx ;ᯮᮡ ¢ëà ¢­¨¢ ­¨ï ç¨á¥«
  856.         mov dword[edi+offs_id_gr],0 ;id £àã¯ë ¨ ¯à®¨§¢®¤¨â¥«ï, ª®â®àë© ¢á¥£¤  0 ¤«ï app1
  857.         add eax,18
  858.         mov [edi],eax
  859.         sub eax,8
  860.         mov [edi+4],eax
  861.  
  862.         jmp @f
  863.         .no_exif:
  864.                 mov dword[edi],0
  865.         @@:
  866.         ret
  867. endp
  868.  
  869. ;input:
  870. ; app1 - 㪠§ â¥«ì ­  ­ ç «® exif.app1
  871. ; num - ¯®à浪®¢ë© ­®¬¥à ⥣  (­ ç¨­ ¥âáï á 1)
  872. ; txt - 㪠§ â¥«ì ­  ⥪áâ, ªã¤  ¡ã¤¥â § ¯¨á ­® §­ ç¥­¨¥
  873. ; t_max - ¬ ªá¨¬ «ì­ë© à §¬¥à ⥪áâ 
  874. align 4
  875. proc exif_get_app1_tag, app1:dword, num:dword, txt:dword, t_max:dword
  876. pushad
  877.         mov eax,[app1]
  878.         mov edi,[txt]
  879.         mov ecx,[num]
  880.  
  881.         xor edx,edx
  882.         mov byte[edi],dl
  883.         cmp [eax],edx
  884.         je .end_f ;¥á«¨ ­¥ ­ ©¤¥­ 㪠§ â¥«ì ­  ­ ç «® exif.app1
  885.         cmp ecx,edx
  886.         jle .end_f ;¥á«¨ ¯®à浪®¢ë© ­®¬¥à ⥣  <= 0
  887.  
  888.         movzx edx,word[eax+offs_m_or_i] ;if 'MM' edx=1
  889.  
  890.         ;¯à®¢¥à塞 ç¨á«® ⥣®¢
  891.         mov eax,[eax]
  892.         movzx ebx,word[eax]
  893.         bt edx,0
  894.         jnc @f
  895.                 ror bx,8
  896.         @@:
  897.         cmp ecx,ebx
  898.         jg .end_f ;¥á«¨ ­®¬¥à ⥣  ¡®«ìè¥ ç¥¬ ¨å ¥áâì ¢ ä ©«¥
  899.  
  900.         ;¯¥à¥å®¤¨¬ ­  § ¤ ­­ë© ⥣
  901.         dec ecx
  902.         imul ecx,tag_size
  903.         add eax,offs_tag_0
  904.         add eax,ecx
  905.  
  906.         stdcall read_tag_value,[app1],[t_max]
  907.  
  908.         .end_f:
  909. popad
  910.         ret
  911. endp
  912.  
  913. ;input:
  914. ; app1 - 㪠§ â¥«ì ­  exif.app1 ¨«¨ ­  exif.app1.child
  915. ; child - 㪠§ â¥«ì ¤«ï § ¯®«­¥­¨ï ­ ç «  ¤®ç¥à­¨å ⥣®¢ exif.app1.child
  916. ; c_tag - ⥣ ¤«ï ª®â®à®£® ¤¥« ¥âáï ¯®¨áª ¤®ç¥à­¨å
  917. ;output:
  918. ; child - 㪠§ â¥«ì ­  ­ ç «® ¤®ç¥à­¨å ⥣®¢
  919. align 4
  920. proc exif_get_app1_child, app1:dword, child:dword , c_tag:dword
  921. pushad
  922.         mov eax,[app1]
  923.         mov edi,[child]
  924.  
  925.         xor edx,edx
  926.         cmp [eax],edx
  927.         je .no_found ;¥á«¨ ­¥ ­ ©¤¥­ 㪠§ â¥«ì ­  ­ ç «® exif.app1
  928.  
  929.         movzx edx,word[eax+offs_m_or_i] ;if 'MM' edx=1
  930.  
  931.         ;­ ç «® ¯®¨áª 
  932.         mov ebx,[c_tag]
  933.         bt edx,0
  934.         jnc @f
  935.                 ror bx,8
  936.         @@:
  937.  
  938.         ;¯à®¢¥à塞 ç¨á«® ⥣®¢
  939.         mov eax,[eax]
  940.         movzx ecx,word[eax]
  941.         bt edx,0
  942.         jnc @f
  943.                 ror cx,8
  944.         @@:
  945.         cmp ecx,1
  946.         jl .no_found ;¥á«¨ ç¨á«® ⥣®¢ <1
  947.  
  948.         ;¯¥à¥å®¤¨¬ ­  1-© ⥣
  949.         add eax,offs_tag_0
  950.         @@:
  951.                 cmp word[eax],bx
  952.                 je @f
  953.                 add eax,tag_size
  954.                 loop @b
  955.         jmp .no_found ;¥á«¨ ­¥ ­ ©¤¥­®
  956.         @@: ;¥á«¨ ­ ©¤¥­®
  957.                 mov ebx,dword[eax+8]
  958.                 bt edx,0
  959.                 jnc @f
  960.                         ror bx,8
  961.                         ror ebx,16
  962.                         ror bx,8
  963.                 @@:
  964.                 mov eax,[app1]
  965.                 add ebx,[eax+4]
  966.                 mov dword[edi],ebx
  967.                 m2m dword[edi+4],dword[eax+4]
  968.                 ror edx,16
  969.                 mov dx,word[c_tag]
  970.                 ror edx,16
  971.                 mov dword[edi+offs_m_or_i],edx
  972.                 m2m word[edi+offs_id_gr_mak],word[eax+offs_id_gr_mak]
  973.  
  974.         jmp .end_f
  975.         .no_found:
  976.                 mov dword[edi],0
  977.         .end_f:
  978. popad
  979.         ret
  980. endp
  981.  
  982. ;output:
  983. ; app2 - 㪠§ â¥«ì ­  ­ ç «® exif.app2 (¨«¨ 0 ¥á«¨ ­¥ ­ ©¤¥­® ¨«¨ ä®à¬ â ä ©«  ­¥ ¯®¤¤¥à¦¨¢ ¥âáï)
  984. align 4
  985. proc exif_get_app2, app1:dword, app2:dword
  986. pushad
  987.         mov edi,[app2]
  988.         mov eax,[app1]
  989.         xor edx,edx
  990.         cmp [eax],edx
  991.         je .no_suport ;¥á«¨ ­¥ ­ ©¤¥­ 㪠§ â¥«ì ­  ­ ç «® exif.app1
  992.  
  993.         movzx edx,word[eax+offs_m_or_i] ;if 'MM' edx=1
  994.  
  995.         ;­ ç «® ¯®¨áª  ¯à®¨§¢®¤¨â¥«ï ª ¬¥àë
  996.         mov ebx,0x010f
  997.         bt edx,0
  998.         jnc @f
  999.                 ror bx,8
  1000.         @@:
  1001.  
  1002.         ;¯à®¢¥à塞 ç¨á«® ⥣®¢
  1003.         mov eax,[eax]
  1004.         movzx ecx,word[eax]
  1005.         bt edx,0
  1006.         jnc @f
  1007.                 ror cx,8
  1008.         @@:
  1009.         cmp ecx,1
  1010.         jl .no_suport ;¥á«¨ ç¨á«® ⥣®¢ <1
  1011.  
  1012.         ;¯¥à¥å®¤¨¬ ­  1-© ⥣
  1013.         add eax,offs_tag_0
  1014.         @@:
  1015.                 cmp word[eax],bx
  1016.                 je @f
  1017.                 add eax,tag_size
  1018.                 loop @b
  1019.         jmp .no_suport ;¥á«¨ ­¥ ­ ©¤¥­®
  1020.         @@: ;¥á«¨ ­ ©¤¥­®      
  1021.                 mov ebx,dword[eax+4]
  1022.                 bt edx,0
  1023.                 jnc @f
  1024.                         ror bx,8
  1025.                         ror ebx,16
  1026.                         ror bx,8
  1027.                 @@:
  1028.                 cmp ebx,4
  1029.                 jle .no_suport ;­ §¢ ­¨¥ ¯à®¨§¢®¤¨â¥«ï ¬¥­ìè¥ 4 ᨬ¢®«®¢, ­¥ ¯®¤¤¥à¦¨ ¢ ¥âáï
  1030.  
  1031.                 mov ebx,dword[eax+8]
  1032.                 bt edx,0
  1033.                 jnc @f
  1034.                         ror bx,8
  1035.                         ror ebx,16
  1036.                         ror bx,8
  1037.                 @@:
  1038.        
  1039.         ;¯à®¢¥àª  ¯®¤¤¥à¦¨¢ ¥¬ëå ¯à®¨§¢®¤¨â¥«¥©
  1040.         mov eax,[app1]
  1041.         add ebx,[eax+4]
  1042.         cmp dword[ebx],'Cano'
  1043.         je .suport
  1044.         cmp dword[ebx],'NIKO'
  1045.         je .suport
  1046.         cmp dword[ebx],'Pana'
  1047.         je .suport
  1048.  
  1049.         ;¢á¥ ®áâ «ì­ë¥ ­¥ ¯®¤¤¥à¦¨¢ îâáï
  1050.         jmp .no_suport
  1051.  
  1052.         .suport:
  1053.         ;­ å®¤¨¬ ⥣ 0x8769 (à áè¨à¥­­ë¥ ¤ ­­ë¥ ¯® Exif)
  1054.         stdcall exif_get_app1_child, eax,edi,0x8769
  1055.         cmp dword[edi],0
  1056.         je .no_suport
  1057.         ;­ å®¤¨¬ ⥣ 0x927c (¤ ­­ë¥ Maker ¯® ª ¬¥à¥)
  1058.         stdcall exif_get_app1_child, edi,edi, 0x927c
  1059.         cmp dword[edi],0
  1060.         je .no_suport
  1061.  
  1062.         cmp dword[ebx],'NIKO'
  1063.         jne @f
  1064.                 ;for Nikon
  1065.                 add dword[edi],18
  1066.                 mov eax,dword[edi]
  1067.                 sub eax,8
  1068.                 mov dword[edi+4],eax
  1069.                 mov word[edi+offs_id_gr_mak],'Ni'
  1070.         @@:
  1071.         cmp dword[ebx],'Pana'
  1072.         jne @f
  1073.                 ;for Panasonic
  1074.                 add dword[edi],12
  1075.                 mov word[edi+offs_id_gr_mak],'Pa'
  1076.         @@:
  1077.         cmp dword[ebx],'Cano'
  1078.         jne @f
  1079.                 ;for Canon
  1080.                 mov word[edi+offs_id_gr_mak],'Ca'
  1081.         @@:
  1082.  
  1083.         jmp @f
  1084.         .no_suport:
  1085.                 mov dword[edi],0
  1086.         @@:
  1087. popad
  1088.         ret
  1089. endp
  1090.  
  1091. ;description:
  1092. ; ¢á¯®¬®£ â¥«ì­ ï äã­ªæ¨ï ¤«ï ç⥭¨ï ­ §­ ç¥­¨© ⥣®¢
  1093. ;input:
  1094. ; eax - 㪠§ â¥«ì ­ ç «  ⥣ 
  1095. ; edi - 㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï § ¯¨á¨ ⥪á⮢®© áâப¨
  1096. align 4
  1097. proc read_tag_value, app1:dword, t_max:dword
  1098.         push exif_tag_numbers
  1099.         pop esi
  1100.  
  1101.         ;¯®¨áª â ¡«¨æë ¤«ï £à㯯ë ⥣®¢
  1102.         mov ebx,[app1]
  1103.         mov ebx,dword[ebx+offs_id_gr] ;¡¥à¥¬ ¨¤¥­â¨ä¨ª â®à £à㯯ë ⥣®¢
  1104.         @@:
  1105.                 cmp dword[esi],ebx
  1106.                 je .set_table
  1107.                 add esi,8
  1108.                 cmp esi,exif_tag_numbers.end
  1109.                 jge .tag_unknown ;⥣ ­¥ ®¯®§­ ­ (­¥ ­ ©¤¥­  â ¡«¨æ  £à㯯ë ⥣®¢)
  1110.                 jmp @b
  1111.         .set_table:
  1112.                 mov esi,dword[esi+4] ;ãáâ ­®¢ª   ¤à¥á  â ¡«¨æë ¢ esi
  1113.  
  1114.         ;¯®¨áª ­ §¢ ­¨ï ⥣  ¢ â ¡«¨æ¥
  1115.         .next_tag:
  1116.         mov bx,word[esi]
  1117.         cmp bx,0
  1118.         jne @f
  1119.                 cmp dword[esi],0
  1120.                 jne @f
  1121.                 jmp .tag_unknown ;⥣ ­¥ ®¯®§­ ­ (¢ £à㯯¥ ­¥ ­ ©¤¥­ ⥣)
  1122.         @@:
  1123.         bt edx,0
  1124.         jc @f
  1125.                 ror bx,8
  1126.         @@:
  1127.         cmp word[eax],bx
  1128.         je .found
  1129.         inc esi
  1130.         @@:
  1131.                 inc esi
  1132.                 cmp byte[esi],0
  1133.                 jne @b
  1134.         inc esi
  1135.         jmp .next_tag
  1136.         .found:
  1137.  
  1138.         ;ª®¯¨à㥬 áâபã á ­ §¢ ­¨¥¬ ⥣ 
  1139.         add esi,2
  1140.         stdcall str_n_cat,edi,esi,[t_max]
  1141.  
  1142.         jmp .start_read
  1143.         .tag_unknown:
  1144.                 ;¥á«¨ ⥣ ­¥ ­ ©¤¥­ áâ ¢¨¬ ¥£® ª®¤ ¢¬¥áâ® ­ §¢ ­¨ï
  1145.                 movzx ebx,word[eax]
  1146.                 bt edx,0
  1147.                 jnc @f
  1148.                         ror bx,8
  1149.                 @@:
  1150.                 stdcall hex_in_str, edi, ebx,4
  1151.                 mov byte[edi+4],0
  1152.         .start_read:
  1153.  
  1154.         ;ç¨â ¥¬ ¨­ä®à¬ æ¨î ¢ ⥣¥
  1155.         mov bx,tag_format_ui1b
  1156.         bt edx,0
  1157.         jnc @f
  1158.                 ror bx,8
  1159.         @@:
  1160.         cmp word[eax+2],bx
  1161.         jne .tag_01
  1162.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1163.                 call get_tag_data_size
  1164.                 cmp ebx,4
  1165.                 jg .over4b_01
  1166.                 cmp ebx,1
  1167.                 je @f
  1168.                         or edx,2 ;array data
  1169.                         mov ecx,dword[eax+8]
  1170.                         mov dh,bl
  1171.                 @@:
  1172.                         ;¥á«¨ 1 ®¤­® ¡ ©â®¢®¥ ç¨á«®
  1173.                         movzx ebx,byte[eax+8]
  1174.                         stdcall str_len,edi
  1175.                         add edi,eax
  1176.                         mov eax,ebx
  1177.                         stdcall convert_int_to_str, [t_max]
  1178.                         bt edx,1
  1179.                         jnc .end_f
  1180.                         @@:
  1181.                                 ;¥á«¨ ®â 2 ¤® 4 ®¤­® ¡ ©â®¢ëå ç¨á¥«
  1182.                                 dec dh
  1183.                                 cmp dh,0
  1184.                                 je .end_f
  1185.                                 shr ecx,8
  1186.                                 stdcall str_n_cat,edi,txt_zap,[t_max]
  1187.                                 stdcall str_len,edi
  1188.                                 add edi,eax
  1189.                                 movzx eax,cl
  1190.                                 stdcall convert_int_to_str, [t_max]
  1191.                                 jmp @b
  1192.                 .over4b_01:
  1193.                         ;...
  1194.                 jmp .end_f
  1195.         .tag_01:
  1196.  
  1197.         mov bx,tag_format_text
  1198.         bt edx,0
  1199.         jnc @f
  1200.                 ror bx,8
  1201.         @@:
  1202.         cmp word[eax+2],bx
  1203.         jne .tag_02
  1204.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1205.                 call get_tag_data_size ;¯à®¢¥à塞 ¤«¨­­ã áâப¨
  1206.                 cmp ebx,4
  1207.                 jg @f
  1208.                         ;¥á«¨ áâப  ¯®¬¥é ¥âáï ¢ 4 ᨬ¢®« 
  1209.                         mov esi,eax
  1210.                         add esi,8
  1211.                         stdcall str_n_cat,edi,esi,[t_max]
  1212.                         jmp .end_f
  1213.                 ;¥á«¨ áâப  ­¥ ¯®¬¥é ¥âáï ¢ 4 ᨬ¢®« 
  1214.                 @@:
  1215.                 mov esi,dword[eax+8]
  1216.                 bt edx,0
  1217.                 jnc @f
  1218.                         ror si,8
  1219.                         ror esi,16
  1220.                         ror si,8
  1221.                 @@:
  1222.                 mov eax,[app1]
  1223.                 mov eax,[eax+4]
  1224.                 add esi,eax
  1225.                 stdcall str_n_cat,edi,esi,[t_max]
  1226.                 jmp .end_f
  1227.         .tag_02:
  1228.  
  1229.         mov bx,tag_format_ui2b
  1230.         bt edx,0
  1231.         jnc @f
  1232.                 ror bx,8
  1233.         @@:
  1234.         cmp word[eax+2],bx
  1235.         jne .tag_03
  1236.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1237.                 call get_tag_data_size
  1238.                 cmp ebx,2
  1239.                 jg .over4b_03
  1240.                 jne @f
  1241.                         ;¥á«¨ ¤¢  2 ¡ ©â®¢ëå ç¨á« 
  1242.                         or edx,2 ;array data
  1243.                         movzx ecx,word[eax+10]
  1244.                         bt edx,0
  1245.                         jnc @f
  1246.                                 ror cx,8
  1247.                         @@:
  1248.                         ;¥á«¨ ®¤­® 2 ¡ ©â®¢®¥ ç¨á«®
  1249.                         movzx ebx,word[eax+8]
  1250.                         bt edx,0
  1251.                         jnc @f
  1252.                                 ror bx,8
  1253.                         @@:
  1254.                         stdcall str_len,edi
  1255.                         add edi,eax
  1256.                         mov eax,ebx
  1257.                         stdcall convert_int_to_str, [t_max]
  1258.                         bt edx,1 ;array ?
  1259.                         jnc .end_f
  1260.                         ;¤®¡ ¢«ï¥¬ 2-¥ ç¨á«®
  1261.                         stdcall str_n_cat,edi,txt_zap,[t_max]
  1262.                         stdcall str_len,edi
  1263.                         add edi,eax
  1264.                         mov eax,ecx
  1265.                         stdcall convert_int_to_str, [t_max]
  1266.                         jmp .end_f
  1267.                 .over4b_03:
  1268.                         mov ecx,[t_max]
  1269.                         mov esi,dword[eax+8]
  1270.                         bt edx,0
  1271.                         jnc @f
  1272.                                 ror si,8
  1273.                                 ror esi,16
  1274.                                 ror si,8
  1275.                         @@:
  1276.                         mov eax,[app1]
  1277.                         mov eax,[eax+4]
  1278.                         add esi,eax
  1279.                        
  1280.                         ;¡¥à¥¬ ç¨á«®
  1281.                         .array_03:
  1282.                         stdcall str_len,edi
  1283.                         cmp ecx,eax
  1284.                         jle .end_f ;¥á«¨ ­¥ 墠⨫® áâப¨
  1285.                         add edi,eax
  1286.                         sub ecx,eax
  1287.                         movzx eax,word[esi]
  1288.                         bt edx,0
  1289.                         jnc @f
  1290.                                 ror ax,8
  1291.                         @@:
  1292.                         stdcall convert_int_to_str,ecx
  1293.  
  1294.                         dec ebx
  1295.                         cmp ebx,0
  1296.                         je .end_f
  1297.  
  1298.                         ;¤®¡ ¢«ï¥¬ § ¯ïâãî
  1299.                         stdcall str_n_cat,edi,txt_zap,ecx
  1300.                         add esi,2
  1301.                         jmp .array_03
  1302.         .tag_03:
  1303.  
  1304.         mov bx,tag_format_ui4b
  1305.         bt edx,0
  1306.         jnc @f
  1307.                 ror bx,8
  1308.         @@:
  1309.         cmp word[eax+2],bx
  1310.         jne .tag_04
  1311.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1312.                 call get_tag_data_size
  1313.                 cmp ebx,1
  1314.                 jg .over4b_04
  1315.                         ;¥á«¨ ®¤­® 4 ¡ ©â®¢®¥ ç¨á«®
  1316.                         mov ebx,dword[eax+8]
  1317.                         bt edx,0
  1318.                         jnc @f
  1319.                                 ror bx,8
  1320.                                 ror ebx,16
  1321.                                 ror bx,8
  1322.                         @@:
  1323.                         stdcall str_len,edi
  1324.                         add edi,eax
  1325.                         mov eax,ebx
  1326.                         stdcall convert_int_to_str, [t_max]
  1327.                 .over4b_04:
  1328.                         ;...
  1329.                 jmp .end_f
  1330.         .tag_04:
  1331.  
  1332.         mov bx,tag_format_urb
  1333.         bt edx,0
  1334.         jnc @f
  1335.                 ror bx,8
  1336.         @@:
  1337.         cmp word[eax+2],bx
  1338.         jne .tag_05
  1339.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1340.                 ;call get_tag_data_size
  1341.                 ;cmp ebx,1
  1342.                 ;jg .over4b_05
  1343.                         mov ebx,dword[eax+8]
  1344.                         bt edx,0
  1345.                         jnc @f
  1346.                                 ror bx,8
  1347.                                 ror ebx,16
  1348.                                 ror bx,8
  1349.                         @@:
  1350.                         stdcall str_len,edi
  1351.                         add edi,eax
  1352.                         mov eax,[app1]
  1353.                         mov eax,[eax+4]
  1354.                         add ebx,eax
  1355.                         mov eax,[ebx]
  1356.                         bt edx,0
  1357.                         jnc @f
  1358.                                 ror ax,8
  1359.                                 ror eax,16
  1360.                                 ror ax,8
  1361.                         @@:
  1362.                         stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 1-¥ ç¨á«®
  1363.                         stdcall str_n_cat,edi,txt_div,[t_max] ;áâ ¢¨¬ §­ ª ¤¥«¥­¨ï
  1364.                         stdcall str_len,edi
  1365.                         add edi,eax
  1366.                         mov eax,[ebx+4]
  1367.                         bt edx,0
  1368.                         jnc @f
  1369.                                 ror ax,8
  1370.                                 ror eax,16
  1371.                                 ror ax,8
  1372.                         @@:
  1373.                         stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 2-¥ ç¨á«®
  1374.                 ;.over4b_05:
  1375.                         ;...
  1376.                 jmp .end_f
  1377.         .tag_05:
  1378.  
  1379.         mov bx,tag_format_si2b
  1380.         bt edx,0
  1381.         jnc @f
  1382.                 ror bx,8
  1383.         @@:
  1384.         cmp word[eax+2],bx
  1385.         jne .tag_08
  1386.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1387.                 call get_tag_data_size
  1388.                 cmp ebx,2
  1389.                 jg .over4b_08
  1390.                 jne @f
  1391.                         ;¥á«¨ ¤¢  2 ¡ ©â®¢ëå ç¨á« 
  1392.                         or edx,2 ;array data
  1393.                         movzx ecx,word[eax+10]
  1394.                         bt edx,0
  1395.                         jnc @f
  1396.                                 ror cx,8
  1397.                         @@:            
  1398.                         ;¥á«¨ ®¤­® 2 ¡ ©â®¢®¥ ç¨á«®
  1399.                         movzx ebx,word[eax+8]
  1400.                         bt edx,0
  1401.                         jnc @f
  1402.                                 ror bx,8
  1403.                         @@:
  1404.                         stdcall str_len,edi
  1405.                         add edi,eax
  1406.                         bt bx,15
  1407.                         jnc @f
  1408.                                 mov byte[edi],'-'
  1409.                                 inc edi
  1410.                                 neg bx
  1411.                                 inc bx
  1412.                         @@:
  1413.                         mov eax,ebx
  1414.                         stdcall convert_int_to_str, [t_max]
  1415.                         bt edx,1 ;array ?
  1416.                         jnc .end_f
  1417.                         ;¤®¡ ¢«ï¥¬ 2-¥ ç¨á«®
  1418.                         stdcall str_n_cat,edi,txt_zap,[t_max]
  1419.                         stdcall str_len,edi
  1420.                         add edi,eax
  1421.                         bt bx,15
  1422.                         jnc @f
  1423.                                 mov byte[edi],'-'
  1424.                                 inc edi
  1425.                                 neg bx
  1426.                                 inc bx
  1427.                         @@:
  1428.                         mov eax,ecx
  1429.                         stdcall convert_int_to_str, [t_max]
  1430.                         jmp .end_f
  1431.                 .over4b_08:
  1432.                         mov ecx,[t_max]
  1433.                         mov esi,dword[eax+8]
  1434.                         bt edx,0
  1435.                         jnc @f
  1436.                                 ror si,8
  1437.                                 ror esi,16
  1438.                                 ror si,8
  1439.                         @@:
  1440.                         mov eax,[app1]
  1441.                         mov eax,[eax+4]
  1442.                         add esi,eax
  1443.                        
  1444.                         ;¡¥à¥¬ ç¨á«®
  1445.                         .array_08:
  1446.                         stdcall str_len,edi
  1447.                         cmp ecx,eax
  1448.                         jle .end_f ;¥á«¨ ­¥ 墠⨫® áâப¨
  1449.                         add edi,eax
  1450.                         sub ecx,eax
  1451.                         movzx eax,word[esi]
  1452.                         bt edx,0
  1453.                         jnc @f
  1454.                                 ror ax,8
  1455.                         @@:
  1456.                         ;ᬮâਬ ­  §­ ª +|-
  1457.                         bt ax,15
  1458.                         jnc @f
  1459.                                 mov byte[edi],'-'
  1460.                                 inc edi
  1461.                                 neg ax
  1462.                                 inc ax
  1463.                         @@:
  1464.                         stdcall convert_int_to_str,ecx
  1465.  
  1466.                         dec ebx
  1467.                         cmp ebx,0
  1468.                         je .end_f
  1469.  
  1470.                         ;¤®¡ ¢«ï¥¬ § ¯ïâãî
  1471.                         stdcall str_n_cat,edi,txt_zap,ecx
  1472.                         add esi,2
  1473.                         jmp .array_08
  1474.         .tag_08:
  1475.  
  1476.         mov bx,tag_format_si4b
  1477.         bt edx,0
  1478.         jnc @f
  1479.                 ror bx,8
  1480.         @@:
  1481.         cmp word[eax+2],bx
  1482.         jne .tag_09
  1483.                 stdcall str_n_cat,edi,txt_dp,[t_max]
  1484.                 call get_tag_data_size
  1485.                 cmp ebx,1
  1486.                 jg .over4b_09
  1487.                         ;¥á«¨ ®¤­® 4 ¡ ©â®¢®¥ ç¨á«®
  1488.                         mov ebx,dword[eax+8]
  1489.                         bt edx,0
  1490.                         jnc @f
  1491.                                 ror bx,8
  1492.                                 ror ebx,16
  1493.                                 ror bx,8
  1494.                         @@:
  1495.                         stdcall str_len,edi
  1496.                         add edi,eax
  1497.                         bt ebx,31
  1498.                         jnc @f
  1499.                                 mov byte[edi],'-'
  1500.                                 inc edi
  1501.                                 neg ebx
  1502.                                 inc ebx
  1503.                         @@:
  1504.                         mov eax,ebx
  1505.                         stdcall convert_int_to_str, [t_max]
  1506.                 .over4b_09:
  1507.                         ;...
  1508.                 jmp .end_f
  1509.         .tag_09:
  1510.  
  1511.         .end_f:
  1512.         ret
  1513. endp
  1514.  
  1515. ;input:
  1516. ; eax - tag pointer
  1517. ; edx - 1 if 'MM', 0 if 'II'
  1518. ;output:
  1519. ; ebx - data size
  1520. align 4
  1521. get_tag_data_size:
  1522.         mov ebx,dword[eax+4]
  1523.         bt edx,0
  1524.         jnc @f
  1525.                 ror bx,8
  1526.                 ror ebx,16
  1527.                 ror bx,8
  1528.         @@:
  1529.         ret
  1530.  
  1531. align 4
  1532. proc str_n_cat uses eax ecx edi esi, str1:dword, str2:dword, n:dword
  1533.         mov esi,dword[str2]
  1534.         mov ecx,dword[n]
  1535.         mov edi,dword[str1]
  1536.         stdcall str_len,edi
  1537.         add edi,eax
  1538.         cld
  1539.         repne movsb
  1540.         mov byte[edi],0
  1541.         ret
  1542. endp
  1543.  
  1544. ;output:
  1545. ; eax = strlen
  1546. align 4
  1547. proc str_len, str1:dword
  1548.         mov eax,[str1]
  1549.         @@:
  1550.                 cmp byte[eax],0
  1551.                 je @f
  1552.                 inc eax
  1553.                 jmp @b
  1554.         @@:
  1555.         sub eax,[str1]
  1556.         ret
  1557. endp
  1558.  
  1559. align 4
  1560. proc hex_in_str, buf:dword,val:dword,zif:dword
  1561.         pushad
  1562.                 mov edi,dword[buf]
  1563.                 mov ecx,dword[zif]
  1564.                 add edi,ecx
  1565.                 dec edi
  1566.                 mov ebx,dword[val]
  1567.  
  1568.                 .cycle:
  1569.                         mov al,bl
  1570.                         and al,0xf
  1571.                         cmp al,10
  1572.                         jl @f
  1573.                                 add al,'a'-'0'-10
  1574.                         @@:
  1575.                         add al,'0'
  1576.                         mov byte[edi],al
  1577.                         dec edi
  1578.                         shr ebx,4
  1579.                 loop .cycle
  1580.  
  1581.         popad
  1582.         ret
  1583. endp
  1584.  
  1585. ;input:
  1586. ; eax - ç¨á«®
  1587. ; edi - ¡ãä¥à ¤«ï áâப¨
  1588. ; len - ¤«¨­­  ¡ãä¥à 
  1589. ;output:
  1590. align 4
  1591. proc convert_int_to_str, len:dword
  1592. pushad
  1593.         mov esi,[len]
  1594.         add esi,edi
  1595.         dec esi
  1596.         call .str
  1597. popad
  1598.         ret
  1599. endp
  1600.  
  1601. align 4
  1602. .str:
  1603.         mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
  1604.         ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®©
  1605.         cmp eax,ecx ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
  1606.         jb @f
  1607.                 xor edx,edx ;®ç¨áâ¨âì edx
  1608.                 div ecx   ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
  1609.                 push edx  ;¯®«®¦¨âì ¢ á⥪
  1610.                 ;dec edi  ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
  1611.                 call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
  1612.                 pop eax
  1613.         @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
  1614.         cmp edi,esi
  1615.         jge @f
  1616.                 or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  ç¥¬ ¤¢¥ ¢ëè¥
  1617.                 stosb      ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
  1618.                 mov byte[edi],0 ;¢ ª®­¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ­¥ ¢ë« §¨« ¬ãá®à
  1619.         @@:
  1620.         ret        ;¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
  1621.  
  1622.  
  1623.  
  1624. align 16
  1625. EXPORTS:
  1626.         dd sz_exif_get_app1, exif_get_app1
  1627.         dd sz_exif_get_app1_tag, exif_get_app1_tag
  1628.         dd sz_exif_get_app1_child, exif_get_app1_child
  1629.         dd sz_exif_get_app2, exif_get_app2
  1630.         dd 0,0
  1631.         sz_exif_get_app1 db 'exif_get_app1',0
  1632.         sz_exif_get_app1_tag db 'exif_get_app1_tag',0
  1633.         sz_exif_get_app1_child db 'exif_get_app1_child',0
  1634.         sz_exif_get_app2 db 'exif_get_app2',0
  1635.