Subversion Repositories Kolibri OS

Rev

Rev 6314 | Rev 8262 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6314 Rev 6322
Line 8... Line 8...
8
include '../../../../KOSfuncs.inc'
8
include '../../../../KOSfuncs.inc'
9
include '../../../../load_img.inc'
9
include '../../../../load_img.inc'
10
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
10
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
Line 11... Line 11...
11
 
11
 
12
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
12
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
Line 13... Line 13...
13
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 10.03.16',0 ;¯®¤¯¨áì ®ª­ 
13
caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 11.03.16',0 ;¯®¤¯¨áì ®ª­ 
Line 14... Line 14...
14
 
14
 
15
run_file_70 FileInfoBlock
15
run_file_70 FileInfoBlock
Line 266... Line 266...
266
	je .open_file
266
	je .open_file
Line 267... Line 267...
267
 
267
 
268
	mov eax,1
268
	mov eax,1
269
	mov ebx,1
269
	mov ebx,1
270
	.cycle_0:
270
	.cycle_0:
271
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
271
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
272
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
272
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
273
		inc eax
273
		inc eax
274
		add ebx,10
274
		add ebx,10
275
		cmp byte[txt_buf],0
275
		cmp byte[txt_buf],0
Line 276... Line 276...
276
		jne .cycle_0
276
		jne .cycle_0
277
 
277
 
278
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
278
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
279
	stdcall [exif_get_app1_child], h_app1,h_child,0x8769
279
	stdcall [exif_get_child], h_app1,h_child,0x8769
Line 280... Line 280...
280
	cmp dword[h_child],0
280
	cmp dword[h_child],0
281
	je .no_found_child
281
	je .no_found_child
282
 
282
 
283
	mov eax,1
283
	mov eax,1
284
	sub ebx,5
284
	sub ebx,5
285
	.cycle_1:
285
	.cycle_1:
286
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
286
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
287
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
287
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
288
		inc eax
288
		inc eax
Line 312... Line 312...
312
	je .open_file
312
	je .open_file
Line 313... Line 313...
313
 
313
 
314
	mov eax,1
314
	mov eax,1
315
	mov ebx,1
315
	mov ebx,1
316
	.cycle_0:
316
	.cycle_0:
317
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
317
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
318
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
318
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
319
		inc eax
319
		inc eax
320
		add ebx,10
320
		add ebx,10
321
		cmp byte[txt_buf],0
321
		cmp byte[txt_buf],0
Line 322... Line 322...
322
		jne .cycle_0
322
		jne .cycle_0
323
 
323
 
324
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
324
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8825
325
	stdcall [exif_get_app1_child], h_app1,h_child,0x8825
325
	stdcall [exif_get_child], h_app1,h_child,0x8825
Line 326... Line 326...
326
	cmp dword[h_child],0
326
	cmp dword[h_child],0
327
	je .no_found_child
327
	je .no_found_child
328
 
328
 
329
	mov eax,1
329
	mov eax,1
330
	sub ebx,5
330
	sub ebx,5
331
	.cycle_1:
331
	.cycle_1:
332
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
332
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
333
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
333
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
334
		inc eax
334
		inc eax
Line 358... Line 358...
358
	je .open_file
358
	je .open_file
Line 359... Line 359...
359
 
359
 
360
	mov eax,1
360
	mov eax,1
361
	mov ebx,1
361
	mov ebx,1
362
	.cycle_0:
362
	.cycle_0:
363
		stdcall [exif_get_app1_tag], h_app1,eax,txt_buf,80
363
		stdcall [exif_get_tag], h_app1,eax,txt_buf,80
364
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
364
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
365
		inc eax
365
		inc eax
366
		add ebx,10
366
		add ebx,10
367
		cmp byte[txt_buf],0
367
		cmp byte[txt_buf],0
Line 373... Line 373...
373
	je .no_found_child
373
	je .no_found_child
Line 374... Line 374...
374
 
374
 
375
	mov eax,1 ;25
375
	mov eax,1 ;25
376
	sub ebx,5
376
	sub ebx,5
377
	.cycle_1:
377
	.cycle_1:
378
		stdcall [exif_get_app1_tag], h_child,eax,txt_buf,80
378
		stdcall [exif_get_tag], h_child,eax,txt_buf,80
379
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
379
		stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
380
		inc eax
380
		inc eax
381
		add ebx,10
381
		add ebx,10
382
		cmp byte[txt_buf],0
382
		cmp byte[txt_buf],0
Line 401... Line 401...
401
pushad
401
pushad
402
	stdcall [buf2d_clear], buf_0, [buf_0.color]
402
	stdcall [buf2d_clear], buf_0, [buf_0.color]
403
	cmp dword[open_file_size],0
403
	cmp dword[open_file_size],0
404
	je .open_file
404
	je .open_file
Line -... Line 405...
-
 
405
 
-
 
406
	;¢ë¢®¤¨¬ ®¡éãî ¨­ä®à¬ æ¨î ¯® á­¨¬ªã:
-
 
407
	;0x010f - Manufacturer of digicam
-
 
408
	;0x0110 - Model
405
 
409
	;0x0132 - Modify date
-
 
410
	mov ebx,3
-
 
411
	stdcall [exif_get_tag_id], h_app1,0x010f,txt_buf,80
-
 
412
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
-
 
413
	add ebx,10
-
 
414
	stdcall [exif_get_tag_id], h_app1,0x0110,txt_buf,80
406
	mov eax,1
415
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
-
 
416
	add ebx,10
-
 
417
	stdcall [exif_get_tag_id], h_app1,0x0132,txt_buf,80
-
 
418
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
Line 407... Line 419...
407
	mov ebx,1
419
	add ebx,20
408
 
420
 
409
	;­ å®¤¨¬ app2
421
	;­ å®¤¨¬ app2
410
	stdcall [exif_get_app2], h_app1,h_child
422
	stdcall [exif_get_app2], h_app1,h_child
-
 
423
	cmp dword[h_child],0
411
	cmp dword[h_child],0
424
	je .no_found_child
-
 
425
 
412
	je .no_found_child
426
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
413
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
427
	;0x0011 - Preview IFD
414
	stdcall [exif_get_app1_child], h_child,h_child,0x0011
428
	stdcall [exif_get_child], h_child,h_child,0x0011
Line -... Line 429...
-
 
429
	cmp dword[h_child],0
415
	cmp dword[h_child],0
430
	je .no_found_child
416
	je .no_found_child
431
 
417
 
432
	;0x0202 - Preview Image Length
Line -... Line 433...
-
 
433
	stdcall [exif_get_child], h_child,h_child_siz,0x0202
418
	stdcall [exif_get_app1_child], h_child,h_child_siz,0x0202
434
	cmp dword[h_child_siz],0
419
	cmp dword[h_child_siz],0
435
	je .no_found_child
420
	je .no_found_child
436
	
Line 421... Line -...
421
	
-
 
422
	stdcall [exif_get_app1_child], h_child,h_child,0x0201
437
	;0x0201 - Preview Image Start
423
	cmp dword[h_child],0
438
	stdcall [exif_get_child], h_child,h_child,0x0201
424
	je .no_found_child
439
	cmp dword[h_child],0
425
 
440
	je .no_found_child
426
	;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à ebx
441
 
427
	stdcall [img_decode],dword[h_child],dword[h_child_siz],0
442
	stdcall [img_decode],dword[h_child],dword[h_child_siz],0
428
	cmp dword[eax+4],1
443
	cmp dword[eax+4],1
429
	jl .no_found_child
444
	jl .no_found_child
430
	cmp dword[eax+8],1
445
	cmp dword[eax+8],1
431
	jl .no_found_child
446
	jl .no_found_child
432
	mov ebx,eax
-
 
Line -... Line 447...
-
 
447
	mov ebx,eax
433
	stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
448
	stdcall [buf2d_resize],buf_thumb,[eax+4],[eax+8],1
-
 
449
	;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
434
	;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
450
	stdcall [img_to_rgb2],ebx,[buf_thumb]
435
	stdcall [img_to_rgb2],ebx,[buf_thumb]
451
	stdcall [img_destroy],ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
Line 436... Line 452...
436
	;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à ebx
452
 
437
	stdcall [img_destroy],ebx
453
	mov ebx,43
438
 
454
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,ebx,0xb000
439
	stdcall [buf2d_bit_blt], buf_0, 0,15, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
455
	add ebx,10
440
	stdcall [buf2d_draw_text], buf_0, buf_1,txt_thumb,3,3,0xb000
456
	stdcall [buf2d_bit_blt], buf_0, 0,ebx, buf_thumb ;à¨á㥬 ¨§®¡à ¦¥­¨¥
441
	jmp @f
457
	jmp @f
442
 
458
 
Line 473... Line 489...
473
	;­ å®¤¨¬ app2
489
	;­ å®¤¨¬ app2
474
	stdcall [exif_get_app2], h_app1,h_child
490
	stdcall [exif_get_app2], h_app1,h_child
475
	cmp dword[h_child],0
491
	cmp dword[h_child],0
476
	je .end_save_file
492
	je .end_save_file
477
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
493
	;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨
478
	stdcall [exif_get_app1_child], h_child,h_child,0x0011
494
	stdcall [exif_get_child], h_child,h_child,0x0011
479
	cmp dword[h_child],0
495
	cmp dword[h_child],0
480
	je .end_save_file
496
	je .end_save_file
481
	stdcall [exif_get_app1_child], h_child,h_child,0x0201
497
	stdcall [exif_get_child], h_child,h_child,0x0201
482
	cmp dword[h_child],0
498
	cmp dword[h_child],0
483
	je .end_save_file
499
	je .end_save_file
Line 484... Line 500...
484
 
500
 
485
	mov ebx,dword[h_child] ;dword[open_file]
501
	mov ebx,dword[h_child] ;dword[open_file]
Line 655... Line 671...
655
	sz_buf2d_draw_text db 'buf2d_draw_text',0
671
	sz_buf2d_draw_text db 'buf2d_draw_text',0
Line 656... Line 672...
656
 
672
 
657
align 4
673
align 4
658
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
674
import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
659
	exif_get_app1 dd sz_exif_get_app1
-
 
660
	exif_get_app1_tag dd sz_exif_get_app1_tag
-
 
661
	exif_get_app1_child dd sz_exif_get_app1_child
675
	exif_get_app1 dd sz_exif_get_app1
-
 
676
	exif_get_app2 dd sz_exif_get_app2
-
 
677
	exif_get_tag dd sz_exif_get_tag
-
 
678
	exif_get_tag_id dd sz_exif_get_tag_id
-
 
679
	exif_get_child dd sz_exif_get_child
662
	exif_get_app2 dd sz_exif_get_app2
680
 
663
dd 0,0
681
dd 0,0
664
	sz_exif_get_app1 db 'exif_get_app1',0
-
 
665
	sz_exif_get_app1_tag db 'exif_get_app1_tag',0
-
 
666
	sz_exif_get_app1_child db 'exif_get_app1_child',0
682
	sz_exif_get_app1 db 'exif_get_app1',0
-
 
683
	sz_exif_get_app2 db 'exif_get_app2',0
-
 
684
	sz_exif_get_tag db 'exif_get_tag',0
-
 
685
	sz_exif_get_tag_id db 'exif_get_tag_id',0
-
 
686
	sz_exif_get_child db 'exif_get_child',0
Line 667... Line 687...
667
	sz_exif_get_app2 db 'exif_get_app2',0
687
 
Line 668... Line 688...
668
 
688
 
669
sc system_colors 
689
sc system_colors