Subversion Repositories Kolibri OS

Rev

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

  1. use32
  2.         org 0x0
  3.         db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
  4.         dd 0x1
  5.         dd start
  6.         dd i_end ;à §¬¥à ¯à¨«®¦¥­¨ï
  7.         dd mem
  8.         dd stacktop
  9.         dd 0
  10.         dd sys_path
  11.  
  12. include '../../../../macros.inc'
  13. include '../../../../proc32.inc'
  14. include '../../../../develop/libraries/box_lib/load_lib.mac'
  15. include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
  16. include '../../../../dll.inc'
  17.  
  18. @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  19. caption db 'à®á¬®âà ¨­ä®à¬ æ¨¨ Exif 17.07.14',0 ;¯®¤¯¨áì ®ª­ 
  20.  
  21. struct FileInfoBlock
  22.         Function dd ?
  23.         Position dd ?
  24.         Flags    dd ?
  25.         Count    dd ?
  26.         Buffer   dd ?
  27.                 db ?
  28.         FileName dd ?
  29. ends
  30.  
  31. run_file_70 FileInfoBlock
  32. image_data dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  33.  
  34. fn_toolbar db 'toolbar.png',0
  35. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  36. IMAGE_TOOLBAR_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*5
  37. image_data_toolbar dd 0
  38.  
  39. IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©«  á ¨§®¡à ¦¥­¨¥¬
  40.  
  41. memory_file_size dd 512*1024 ;à §¬¥à ¯ ¬ï⨠¤«ï ®âªàëâ¨ï ä ©«®¢ (¢ ­ ç «¥ 512 Kb, ­® ¬®¦¥â 㢥«¨ç¨¢ âáï ¯à¨ ­¥®¡å®¤¨¬®áâ¨)
  42.  
  43. macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨©
  44.         ;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
  45.         if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
  46.                 jmp @f
  47.                         local .path_str
  48.                         .path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
  49.                         db 0
  50.                 @@:
  51.                 ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
  52.                 copy_path .path_str,[32],file_name,0x0
  53.         else
  54.                 copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
  55.         end if
  56.  
  57.         stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
  58.         mov [buf],eax
  59.  
  60.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  61.         mov [run_file_70.Function], 0
  62.         mov [run_file_70.Position], 0
  63.         mov [run_file_70.Flags], 0
  64.         mov [run_file_70.Count], dword size
  65.         m2m [run_file_70.Buffer], [buf]
  66.         mov byte[run_file_70+20], 0
  67.         mov [run_file_70.FileName], file_name
  68.         mov ebx,run_file_70
  69.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  70.         cmp ebx,0xffffffff
  71.         je @f
  72.                 ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
  73.                 stdcall dword[img_decode], dword[buf],ebx,0
  74.                 mov dword[image_data],eax
  75.                 ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
  76.                 stdcall dword[img_to_rgb2], dword[image_data],dword[buf]
  77.                 ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à image_data
  78.                 stdcall dword[img_destroy], dword[image_data]
  79.         @@:
  80. }
  81.  
  82.  
  83.  
  84. align 4
  85. start:
  86.         load_libraries l_libs_start,l_libs_end
  87.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  88.         mov     ebp,lib_0
  89.         cmp     dword [ebp+ll_struc_size-4],0
  90.         jz      @f
  91.                 mcall -1 ;exit not correct
  92.         @@:
  93.         mcall 48,3,sc,sizeof.system_colors
  94.         mcall 40,0xC0000027
  95.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  96.  
  97.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
  98.  
  99.         load_image_file 'font8x9.bmp', image_data_toolbar,IMAGE_FILE1_SIZE
  100.         stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
  101.         stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
  102.         stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
  103.         stdcall [buf2d_convert_text_matrix], buf_1
  104.  
  105.         load_image_file fn_toolbar, image_data_toolbar,IMAGE_TOOLBAR_SIZE
  106.  
  107.         stdcall mem.Alloc,[memory_file_size]
  108.         mov dword[open_file],eax
  109.        
  110.         call but_new_file
  111.  
  112. align 4
  113. red_win:
  114.         call draw_window
  115.  
  116. align 4
  117. still:
  118.         mcall 10
  119.  
  120.         cmp al,1
  121.         jz red_win
  122.         cmp al,2
  123.         jz key
  124.         cmp al,3
  125.         jz button
  126.         cmp al,6 ;¬ëèì
  127.         jne @f
  128.                 jmp mouse
  129.         @@:
  130.         jmp still
  131.  
  132. align 4
  133. draw_window:
  134. pushad
  135.         mcall 12,1
  136.  
  137.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  138.         xor eax,eax
  139.         mov ebx,(20 shl 16)+480
  140.         mov ecx,(20 shl 16)+410
  141.         mov edx,[sc.work]
  142.         or  edx,(3 shl 24)+0x10000000+0x20000000
  143.         mov edi,caption
  144.         int 0x40
  145.  
  146.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  147.         mov eax,8
  148.         mov ebx,(5 shl 16)+20
  149.         mov ecx,(5 shl 16)+20
  150.         mov edx,3
  151.         mov esi,[sc.work_button]
  152.         int 0x40
  153.  
  154.         mov ebx,(30 shl 16)+20
  155.         mov edx,4
  156.         int 0x40
  157.  
  158.         mov ebx,(55 shl 16)+20
  159.         mov edx,5
  160.         int 0x40
  161.  
  162.         mov ebx,(85 shl 16)+20
  163.         mov edx,6
  164.         int 0x40
  165.  
  166.         mov ebx,(110 shl 16)+20
  167.         mov edx,7
  168.         int 0x40
  169.  
  170.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  171.         mov eax,7
  172.         mov ebx,[image_data_toolbar]
  173.         mov ecx,(16 shl 16)+16
  174.         mov edx,(7 shl 16)+7 ;icon new
  175.         int 0x40
  176.  
  177.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  178.         add edx,(25 shl 16) ;icon open
  179.         int 0x40
  180.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  181.         add edx,(25 shl 16) ;icon save
  182.         int 0x40
  183.  
  184.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  185.         add edx,(30 shl 16) ;
  186.         int 0x40
  187.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  188.         add edx,(25 shl 16) ;
  189.         int 0x40
  190.  
  191.         ; *** à¨á®¢ ­¨¥ ¡ãä¥à  ***
  192.         stdcall [buf2d_draw], buf_0
  193.  
  194.         mcall 12,2
  195. popad
  196.         ret
  197.  
  198. align 4
  199. key:
  200.         mcall 2
  201.         jmp still
  202.  
  203. align 4
  204. mouse:
  205.  
  206.         jmp still
  207.  
  208. align 4
  209. button:
  210.         mcall 17
  211.         cmp ah,3
  212.         jne @f
  213.                 call but_new_file
  214.         @@:
  215.         cmp ah,4
  216.         jne @f
  217.                 call but_open_file
  218.         @@:
  219.         cmp ah,5
  220.         jne @f
  221.                 call but_save_file
  222.         @@:
  223.         cmp ah,6
  224.         jne @f
  225.                 call but_1
  226.         @@:
  227.         cmp ah,7
  228.         jne @f
  229.                 call but_2
  230.         @@:
  231.         cmp ah,1
  232.         jne still
  233. .exit:
  234.         stdcall [buf2d_delete],buf_0
  235.         stdcall [buf2d_delete],buf_1 ;㤠«ï¥¬ ¡ãä¥à
  236.         stdcall mem.Free,[image_data_toolbar]
  237.         stdcall mem.Free,[open_file]
  238.         mcall -1
  239.  
  240.  
  241. align 4
  242. but_new_file:
  243.         mov dword[open_file_size],0
  244.         call draw_file
  245.         ret
  246.  
  247. align 4
  248. open_file dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  249. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©«  (¤®«¦¥­ ¡ëâì ­¥ ¡®«ìè¥ memory_file_size)
  250.  
  251. align 4
  252. but_open_file:
  253.         pushad
  254.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  255.         mov [OpenDialog_data.type],0
  256.         stdcall [OpenDialog_Start],OpenDialog_data
  257.         cmp [OpenDialog_data.status],2
  258.         je .end_open_file
  259.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  260.  
  261.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  262.         mov [run_file_70.Function], 5
  263.         mov [run_file_70.Position], 0
  264.         mov [run_file_70.Flags], 0
  265.         mov dword[run_file_70.Count], 0
  266.         m2m [run_file_70.Buffer], [open_file]
  267.         mov byte[run_file_70+20], 0
  268.         mov dword[run_file_70.FileName], openfile_path
  269.         mov ebx,run_file_70
  270.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  271.         cmp eax,0
  272.         jne .end_open_file
  273.  
  274.         mov eax,[open_file]
  275.         mov ebx,dword[eax+32] ;dword[eax+32] - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  276.         mov dword[open_file_size],ebx ;ebx - à §¬¥à ®âªà뢠¥¬®£® ä ©« 
  277.         ;memory_file_size - à §¬¥à ¢ë¤¥«¥­­®© ¯ ¬ï⨠¤«ï ä ©« 
  278.         cmp dword[memory_file_size],ebx
  279.         jge @f
  280.                 ;㢥«¨ç¨¢ ¥¬ ¯ ¬ïâì ¥á«¨ ­¥ 墠⨫®
  281.                 mov dword[memory_file_size],ebx
  282.                 stdcall mem.ReAlloc, dword[open_file],ebx
  283.         @@:
  284.  
  285.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  286.         mov [run_file_70.Function], 0
  287.         mov [run_file_70.Position], 0
  288.         mov [run_file_70.Flags], 0
  289.         m2m dword[run_file_70.Count], dword[open_file_size]
  290.         m2m dword[run_file_70.Buffer],dword[open_file]
  291.         mov byte[run_file_70+20], 0
  292.         mov dword[run_file_70.FileName], openfile_path
  293.         mov ebx,run_file_70
  294.         int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  295.         cmp ebx,0xffffffff
  296.         je .end_open_file
  297.  
  298.         mov [open_file_size],ebx
  299.         ;add ebx,dword[open_file]
  300.         ;mov byte[ebx],0 ;­  á«ãç © ¥á«¨ à ­¥¥ ¡ë« ®âªàëâ ä ©« ¡®«ì襣® à §¬¥à  ç¨á⨬ ª®­¥æ ¡ãä¥à  á ä ©«®¬
  301.         stdcall [exif_get_app1], [open_file],h_app1
  302.         mcall 71,1,openfile_path
  303.  
  304.         call draw_file
  305.         .end_open_file:
  306.         popad
  307.         ret
  308.  
  309. align 4
  310. draw_file:
  311. pushad
  312.         stdcall [buf2d_clear], buf_0, [buf_0.color]
  313.         cmp dword[open_file_size],0
  314.         je .open_file
  315.  
  316.         mov eax,1
  317.         mov ebx,1
  318.         .cycle_0:
  319.                 stdcall [exif_get_app1_tag], [h_app1],eax,txt_buf,80
  320.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb0
  321.                 inc eax
  322.                 add ebx,10
  323.                 cmp byte[txt_buf],0
  324.                 jne .cycle_0
  325.  
  326.         ;áç¨â뢠¥¬ ¤®ç¥à­¨¥ ⥣¨ ¤«ï 0x8769
  327.         stdcall [exif_get_app1_child], [h_app1],h_child,0x8769 ;0x8825
  328.         cmp dword[h_child],0
  329.         je @f
  330.  
  331.         mov eax,1
  332.         sub ebx,5
  333.         .cycle_1:
  334.                 stdcall [exif_get_app1_child_tag], [h_app1],[h_child],eax,txt_buf,80
  335.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_buf,3,ebx,0xb00000
  336.                 inc eax
  337.                 add ebx,10
  338.                 cmp byte[txt_buf],0
  339.                 jne .cycle_1
  340.  
  341.         jmp @f
  342.         .open_file:
  343.                 stdcall [buf2d_draw_text], buf_0, buf_1,txt_openfile,3,3,0xb000
  344.         @@:
  345.         stdcall [buf2d_draw], buf_0
  346. popad
  347.         ret
  348.  
  349. align 4
  350. but_save_file:
  351.         pushad
  352.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  353.         mov [OpenDialog_data.type],1
  354.         stdcall [OpenDialog_Start],OpenDialog_data
  355.         cmp [OpenDialog_data.status],2
  356.         je .end_save_file
  357.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  358.  
  359.         mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
  360.         mov [run_file_70.Function], 2
  361.         mov [run_file_70.Position], 0
  362.         mov [run_file_70.Flags], 0
  363.         mov ebx, dword[open_file]
  364.         mov [run_file_70.Buffer], ebx
  365.         mov ebx,[open_file_size]
  366.         mov dword[run_file_70.Count], ebx ;à §¬¥à ä ©« 
  367.         mov byte[run_file_70+20], 0
  368.         mov dword[run_file_70.FileName], openfile_path
  369.         mov ebx,run_file_70
  370.         int 0x40 ;á®å࠭塞 ä ©« ¨§®¡à ¦¥­¨ï
  371.         ;cmp ebx,0xffffffff
  372.         ;je .end_save_file
  373.         ; ... á®®¡é¥­¨¥ ® ­¥ã¤ ç­®¬ á®åà ­¥­¨¨ ...
  374.  
  375.         .end_save_file:
  376.         popad
  377.         ret
  378.  
  379. align 4
  380. but_1:
  381.         stdcall [exif_get_app1_tag], [h_app1],1,txt_buf,80
  382.         notify_window_run txt_buf      
  383.         ret
  384.  
  385. align 4
  386. but_2:
  387.         stdcall [exif_get_app1_tag], [h_app1],2,txt_buf,80
  388.         notify_window_run txt_buf
  389.         ret
  390.  
  391. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  392. align 4
  393. OpenDialog_data:
  394. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  395. .procinfo               dd procinfo     ;+4
  396. .com_area_name          dd communication_area_name      ;+8
  397. .com_area               dd 0    ;+12
  398. .opendir_path           dd plugin_path  ;+16
  399. .dir_default_path       dd default_dir ;+20
  400. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  401. .draw_window            dd draw_window  ;+28
  402. .status                 dd 0    ;+32
  403. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  404. .filename_area          dd filename_area        ;+40
  405. .filter_area            dd Filter
  406. .x:
  407. .x_size                 dw 420 ;+48 ; Window X size
  408. .x_start                dw 10 ;+50 ; Window X position
  409. .y:
  410. .y_size                 dw 320 ;+52 ; Window y size
  411. .y_start                dw 10 ;+54 ; Window Y position
  412.  
  413. default_dir db '/rd/1',0
  414.  
  415. communication_area_name:
  416.         db 'FFFFFFFF_open_dialog',0
  417. open_dialog_name:
  418.         db 'opendial',0
  419. communication_area_default_path:
  420.         db '/rd/1/File managers/',0
  421.  
  422. Filter:
  423. dd Filter.end - Filter ;.1
  424. .1:
  425. db 'JPG',0
  426. db 'JPEG',0
  427. .end:
  428. db 0
  429.  
  430.  
  431.  
  432. head_f_i:
  433. head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0
  434.  
  435. system_dir_0 db '/sys/lib/'
  436. lib_name_0 db 'proc_lib.obj',0
  437. err_message_found_lib_0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'proc_lib.obj',39,0
  438. err_message_import_0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
  439.  
  440. system_dir_1 db '/sys/lib/'
  441. lib_name_1 db 'libimg.obj',0
  442. err_message_found_lib_1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'libimg.obj',39,0
  443. err_message_import_1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
  444.  
  445. system_dir_2 db '/sys/lib/'
  446. lib_name_2 db 'buf2d.obj',0
  447. err_msg_found_lib_2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'buf2d.obj',39,0
  448. err_msg_import_2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
  449.  
  450. system_dir_3 db '/sys/lib/'
  451. lib_name_3 db 'exif.obj',0
  452. err_msg_found_lib_3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  ',39,'exif.obj',39,0
  453. err_msg_import_3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
  454.  
  455. l_libs_start:
  456.         lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
  457.                 err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
  458.         lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
  459.                 err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
  460.         lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
  461.                 err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
  462.         lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
  463.                 err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
  464. l_libs_end:
  465.  
  466. align 4
  467. import_libimg:
  468.         dd alib_init1
  469.         img_is_img  dd aimg_is_img
  470.         img_info    dd aimg_info
  471.         img_from_file dd aimg_from_file
  472.         img_to_file dd aimg_to_file
  473.         img_from_rgb dd aimg_from_rgb
  474.         img_to_rgb  dd aimg_to_rgb
  475.         img_to_rgb2 dd aimg_to_rgb2
  476.         img_decode  dd aimg_decode
  477.         img_encode  dd aimg_encode
  478.         img_create  dd aimg_create
  479.         img_destroy dd aimg_destroy
  480.         img_destroy_layer dd aimg_destroy_layer
  481.         img_count   dd aimg_count
  482.         img_lock_bits dd aimg_lock_bits
  483.         img_unlock_bits dd aimg_unlock_bits
  484.         img_flip    dd aimg_flip
  485.         img_flip_layer dd aimg_flip_layer
  486.         img_rotate  dd aimg_rotate
  487.         img_rotate_layer dd aimg_rotate_layer
  488.         img_draw    dd aimg_draw
  489.  
  490.         dd 0,0
  491.         alib_init1   db 'lib_init',0
  492.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  493.         aimg_info    db 'img_info',0
  494.         aimg_from_file db 'img_from_file',0
  495.         aimg_to_file db 'img_to_file',0
  496.         aimg_from_rgb db 'img_from_rgb',0
  497.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  498.         aimg_to_rgb2 db 'img_to_rgb2',0
  499.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  500.         aimg_encode  db 'img_encode',0
  501.         aimg_create  db 'img_create',0
  502.         aimg_destroy db 'img_destroy',0
  503.         aimg_destroy_layer db 'img_destroy_layer',0
  504.         aimg_count   db 'img_count',0
  505.         aimg_lock_bits db 'img_lock_bits',0
  506.         aimg_unlock_bits db 'img_unlock_bits',0
  507.         aimg_flip    db 'img_flip',0
  508.         aimg_flip_layer db 'img_flip_layer',0
  509.         aimg_rotate  db 'img_rotate',0
  510.         aimg_rotate_layer db 'img_rotate_layer',0
  511.         aimg_draw    db 'img_draw',0
  512.  
  513. align 4
  514. proclib_import: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  515.         OpenDialog_Init dd aOpenDialog_Init
  516.         OpenDialog_Start dd aOpenDialog_Start
  517. dd 0,0
  518.         aOpenDialog_Init db 'OpenDialog_init',0
  519.         aOpenDialog_Start db 'OpenDialog_start',0
  520.  
  521. align 4
  522. import_buf2d:
  523.         init dd sz_init
  524.         buf2d_create dd sz_buf2d_create
  525.         buf2d_create_f_img dd sz_buf2d_create_f_img
  526.         buf2d_clear dd sz_buf2d_clear
  527.         buf2d_draw dd sz_buf2d_draw
  528.         buf2d_delete dd sz_buf2d_delete
  529.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  530.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  531.         buf2d_draw_text dd sz_buf2d_draw_text
  532.         dd 0,0
  533.         sz_init db 'lib_init',0
  534.         sz_buf2d_create db 'buf2d_create',0
  535.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  536.         sz_buf2d_clear db 'buf2d_clear',0
  537.         sz_buf2d_draw db 'buf2d_draw',0
  538.         sz_buf2d_delete db 'buf2d_delete',0
  539.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  540.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  541.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  542.  
  543. align 4
  544. import_exif: ;®¯¨á ­¨¥ íªá¯®àâ¨à㥬ëå ä㭪権
  545.         exif_get_app1 dd sz_exif_get_app1
  546.         exif_get_app1_tag dd sz_exif_get_app1_tag
  547.         exif_get_app1_child dd sz_exif_get_app1_child
  548.         exif_get_app1_child_tag dd sz_exif_get_app1_child_tag
  549. dd 0,0
  550.         sz_exif_get_app1 db 'exif_get_app1',0
  551.         sz_exif_get_app1_tag db 'exif_get_app1_tag',0
  552.         sz_exif_get_app1_child db 'exif_get_app1_child',0
  553.         sz_exif_get_app1_child_tag db 'exif_get_app1_child_tag',0
  554.         ;exif_get_image_160_120
  555.  
  556. sc system_colors
  557.  
  558. align 16
  559. procinfo process_information
  560.  
  561. align 4
  562. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  563.         dw 5 ;+4 left
  564.         dw 31 ;+6 top
  565. .w: dd 456 ;+8 w
  566. .h: dd 350 ;+12 h
  567. .color: dd 0xffffd0 ;+16 color
  568.         db 24 ;+20 bit in pixel
  569.  
  570. align 4
  571. buf_1:
  572.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  573.         dw 25 ;+4 left
  574.         dw 25 ;+6 top
  575.         dd 128 ;+8 w
  576.         dd 144 ;+12 h
  577.         dd 0 ;+16 color
  578.         db 24 ;+20 bit in pixel
  579.  
  580. h_app1  dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª £« ¢­ëå ⥣®¢
  581. h_child dd 0 ;㪠§ â¥«ì ­  § £®«®¢®ª ¤®ç¥à­¨å ⥣®¢
  582. txt_openfile db 'Žâªà®©â¥ ä ©« ¨§®¡à ¦¥­¨ï ¢ ä®à¬ â¥ *.jpg.',0
  583. txt_buf rb 80
  584.  
  585. i_end:
  586.         rb 2048
  587. stacktop:
  588.         sys_path rb 1024
  589.         file_name:
  590.                 rb 1024 ;4096
  591.         library_path rb 1024
  592.         plugin_path rb 4096
  593.         openfile_path rb 4096
  594.         filename_area rb 256
  595. mem:
  596.