forked from KolibriOS/kolibrios
174e0e1523
add new function 'exif_get_tag_id' git-svn-id: svn://kolibrios.org@6322 a494cfbc-eb01-0410-851d-a64ba20cac60
160 lines
6.2 KiB
HTML
160 lines
6.2 KiB
HTML
<html>
|
|
<head>
|
|
<title>áèáëèîòåêà äëÿ ïîëó÷åíèÿ èíôîðìàöèè èç ôîðìàòà Exif</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
|
|
<style>
|
|
body
|
|
{
|
|
font-size: 15px;
|
|
font-family: "Bookman Old Style";
|
|
color: black;
|
|
text-align: justify;
|
|
}
|
|
h1 { color: green; font-size: 23px; }
|
|
h2 { color: green; font-size: 21px; }
|
|
h3 { color: green; font-size: 19px; }
|
|
h4 { color: #803f00; font-size: 17px; }
|
|
i { color: #0099cc; }
|
|
b { color: #0099cc; }
|
|
p {
|
|
text-indent: 1em;
|
|
margin-top: 3px;
|
|
margin-bottom: 2px;
|
|
margin-left: 0px;
|
|
margin-right: 0px;
|
|
}
|
|
ol, ul, dl{
|
|
margin-top: 3px;
|
|
margin-bottom: 2px;
|
|
}
|
|
pre
|
|
{
|
|
padding: 2px;
|
|
padding-left: 20px;
|
|
margin-top: 5px;
|
|
margin-bottom: 5px;
|
|
margin-left: 0px;
|
|
margin-right: 0px;
|
|
font-family: "Courier New";
|
|
font-size: 15px;
|
|
color: #004000;
|
|
background-color: #ffd0ff;
|
|
}
|
|
table { font-size: 15px; }
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Îãëàâëåíèå</h1>
|
|
<ul>
|
|
<li>Âñòóïëåíèå</li>
|
|
<li><a href="#fun">Ôóíêöèè</a></li>
|
|
<ul>
|
|
<li><a href="#f_1">exif_get_app1</a></li>
|
|
<li><a href="#f_2">exif_get_tag</a></li>
|
|
<li><a href="#f_5">exif_get_tag_id</a></li>
|
|
<li><a href="#f_3">exif_get_child</a></li>
|
|
<li><a href="#f_4">exif_get_app2</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#const">Êîíñòàíòû äëÿ ôóíêöèè exif_get_child</a></li>
|
|
<li><a href="#tabl_e">Òàáëèöà ýêñïîðòà</a></li>
|
|
<li><a href="#hist">Èñòîðèÿ</a></li>
|
|
</ul>
|
|
|
|
<h1>Âñòóïëåíèå</h1>
|
|
<p>Äîêóìåíòàöèÿ ê ñâîáîäíîé áèáëèîòåêå <b>exif.obj</b>, äëÿ <b>ÎÑ Êîëèáðè</b>.
|
|
Ýòà áèáëèîòåêà ñîçäàíà äëÿ ïðîñìîòðà èíôîðìàöèè íàõîäÿùåéñÿ â èçîáðàæåíèÿõ â ôîðìàòå Exif. Èíôîðìàöèÿ ýòà ñîçäàåòñÿ öèôðîâûìè ôîòîêàìåðàìè è ñîäåðæèò ðàçíûå ïàðàìåòðû íàïðèìåð òàêèå êàê: íàçâàíèå ôèðìû ïðîèçâîäèòåëÿ, ìîäåëü êàìåðû, è ò.ä.</p>
|
|
|
|
<p>Ïîñëåäíåå îáíîâëåíèå áèáëèîòåêè 23.07.14.</p>
|
|
|
|
<h1><a name="fun">Ôóíêöèè</a></h1>
|
|
|
|
<p>Ôóíêöèè ðàáîòàþò ñ óêàçàòåëÿìè íà ñòðóêòóðû app1 èëè íà app1_child. Ïðèìåð ñòðóêòóðû:</p>
|
|
<pre>align 4
|
|
h_app1:
|
|
dd 0 ;+0 óêàçàòåëü íà êîëè÷åñòâî òåãîâ è íà ñàìè òåãè
|
|
dd 0 ;+4 ñìåùåíèå äîáàâëÿåìîå ê óêàçàòåëÿì â òåãàõ
|
|
dw 0 ;+8 ïàðàìåòð, îòâå÷àþùèé çà ïîðÿäîê ñëåäîâàíèÿ áàéòîâ</pre>
|
|
dw 0 ;+10 èäåíòèôèêàòîð äëÿ ãðóïïû òåãîâ</pre>
|
|
|
|
<h4><a name="f_1">exif_get_app1</a></h4>
|
|
<p>Ýòà ôóíêöèÿ èùåò íà÷àëî Exif äàííûõ. Åñëè îíè íàéäåíû òî çàïîëíÿåòñÿ ñòðóêòóðà app1. Åñëè íå íàéäåíû, òî ïåðâûé ïàðàìåòð â ñòðóêòóðå äåëàåòñÿ ðàâíûì 0. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_app1], [open_file],h_app1
|
|
...
|
|
h_app1 rb 14</pre>
|
|
<p>ãäå open_file - óêàçàòåëü íà äàííûå ôàéëà èçîáðàæåíèÿ (ïîêà ïîääåðæèâàþòñÿ òîëüêî *.jpg è *.jpeg).</p>
|
|
<p>h_app1 - ñòðóêòóðà äëÿ çàïîìèíàíèÿ íà÷àëà Exif äàííûõ.</p>
|
|
|
|
<h4><a name="f_2">exif_get_tag</a></h4>
|
|
<p>Çàïîëíÿåò òåêñòîâóþ ñòðîêó èìåíåì ïàðàìåòðà èç Exif è åãî çíà÷åíèåì. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_tag], h_app1,3,txt_buf,80
|
|
...
|
|
h_app1 rb 14
|
|
txt_buf rb 80</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà çàïîëåííàÿ â exif_get_app1 èëè â exif_get_child.</p>
|
|
<p>3 - ïîðÿäêîâûé íîìåð ïàðàìåòðà.</p>
|
|
<p>txt_buf - òåêñòîâûé áóôåð äëÿ çàïîëíåíèÿ.</p>
|
|
<p>80 - ìàêñèìàëüíàÿ äëèíà òåêñòà.</p>
|
|
|
|
<h4><a name="f_5">exif_get_tag_id</a></h4>
|
|
<p>Çàïîëíÿåò òåêñòîâóþ ñòðîêó èìåíåì ïàðàìåòðà èç Exif è åãî çíà÷åíèåì. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_tag_id], h_app1,0x010f,txt_buf,80
|
|
...
|
|
h_app1 rb 14
|
|
txt_buf rb 80</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà çàïîëåííàÿ â exif_get_app1 èëè â exif_get_child.</p>
|
|
<p>0x010f - êîä òåãà â êîòîðîì ñîäåðæèòñÿ íàçâàíèå ïðîèçâîäèòåëÿ êàìåðû.</p>
|
|
<p>txt_buf - òåêñòîâûé áóôåð äëÿ çàïîëíåíèÿ.</p>
|
|
<p>80 - ìàêñèìàëüíàÿ äëèíà òåêñòà.</p>
|
|
|
|
<h4><a name="f_3">exif_get_child</a></h4>
|
|
<p>Åñòü ïðîñòûå òåãè ñ èíôîðìàöèåé à åñòü òåãè óêàçûâàþùèå íà ñïèñêè äðóãèõ òåãîâ. Ýòà ôóíêöèÿ áåðåò óêàçàòåëü íà íà÷àëî ñïèñêà äî÷åðíèõ òåãîâ. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_child], h_app1,h_child,0x8769
|
|
...
|
|
h_app1 rb 14
|
|
h_child rb 14</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà çàïîëåííàÿ â exif_get_app1 èëè â exif_get_child.</p>
|
|
<p>h_child - ñòðóêòóðà äëÿ çàïîëåíèÿ äàííûõ ñïèñêà äî÷åðíèõ òåãîâ.</p>
|
|
<p>0x8769 - êîä òåãà (íàõîäÿùåãîñÿ â ñïèñêå òåãîâ h_app1), êîòîðûé ÿâëÿåòñÿ óêàçàòåëåì íà ñïèñîê äðóãèõ äî÷åðíèõ òåãîâ.</p>
|
|
<p> äàíîì ïðèìåðå ôóíêöèÿ áåðåò òåã 0x8769 è ïûòàåòñÿ íàéòè åãî â ñïèñêå h_app1, åñëè íàõîäèò òî çàïîëíÿåò ïî íåìó çíà÷åíèÿ â ñòðóêòóðå h_child. Äàëåå ê ñïèñêó h_child ìîæíî ïðèìåíÿòü ôóíêöèþ exif_get_tag äëÿ âçÿòèÿ çíà÷åíèÿ ýòèõ òåãîâ. Ñ ïîìîùüþ ýòîé ôóíêöèè ìû êàê áû ïåðåõîäèì âíóòðü íåêîé "ïàïêè" ñ òåãàìè, êîòîðûå ñðàçó äîñòàòü íå ìîæåì.</p>
|
|
|
|
<h4><a name="f_4">exif_get_app2</a></h4>
|
|
<p>Ýòà ôóíêöèÿ èùåò íà÷àëî äàííûõ Exif.app2. Åñëè îíè íàéäåíû òî çàïîëíÿåòñÿ ñòðóêòóðà app2. Åñëè íå íàéäåíû, òî ïåðâûé ïàðàìåòð â ñòðóêòóðå äåëàåòñÿ ðàâíûì 0. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_app2], h_app1,h_app2
|
|
...
|
|
h_app1 rb 14
|
|
h_app2 rb 14</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà c äàííûìè Exif.app1, ïðåäâàðèòåëüíî çàïîëíåííàÿ ôóíêöèåé exif_get_app1.</p>
|
|
<p>h_app2 - ñòðóêòóðà äëÿ çàïîìèíàíèÿ íà÷àëà äàííûõ Exif.app2.</p>
|
|
|
|
<h1><a name="const">Êîíñòàíòû äëÿ ôóíêöèè exif_get_child</a></h1>
|
|
<p>Çäåñü ïðèâåäåíû íåêîòîðûå êîíñòàíòû, êîòîðûå ìîãóò èñïîëüçîâàòñÿ êàê 3-é ïàðàìåòð äëÿ ôóíêöèè exif_get_child. Ýòè êîíñòàíòû îáîçíà÷àþò ñïåöèàëüíûå òåãè, êîòîðûå ñîäåðæàò ñìåùåíèå íà äî÷åðíèå ïàðàìåòðû, êîòîðûå íàõîäÿòñÿ â Exif.</p>
|
|
<h4>0x8769</h4>
|
|
<p>Îáîçíà÷àåò äîïîëíèòåëüíûå ïàðàìåòðû Exif.</p>
|
|
<h4>0x8825</h4>
|
|
<p>Îáîçíà÷àåò ïàðàìåòðû GPS.</p>
|
|
|
|
<h1><a name="tabl_e">Òàáëèöà ýêñïîðòà</a></h1>
|
|
<p>Ïðèìåð òàáëèöû ýêñïîðòà, ðàñ÷èòàííîé íà èñïîëüçîâàíèå ìàêðîñà <b>@use_library</b>:</p>
|
|
<pre>align 4
|
|
import_exif:
|
|
exif_get_app1 dd sz_exif_get_app1
|
|
exif_get_app2 dd sz_exif_get_app2
|
|
exif_get_tag dd sz_exif_get_tag
|
|
exif_get_tag_id dd sz_exif_get_tag_id
|
|
exif_get_child dd sz_exif_get_child
|
|
dd 0,0
|
|
sz_exif_get_app1 db 'exif_get_app1',0
|
|
sz_exif_get_app2 db 'exif_get_app2',0
|
|
sz_exif_get_tag db 'exif_get_tag',0
|
|
sz_exif_get_tag_id db 'exif_get_tag_id',0
|
|
sz_exif_get_child db 'exif_get_child',0</pre>
|
|
|
|
<h1><a name="hist">Èñòîðèÿ</a></h1>
|
|
<p>15.07.14 - ïåðâàÿ âåðñèÿ áèáëèîòåêè, ïðèìåð èñïîëüçîâàíèÿ.</p>
|
|
<p>23.07.14 - äîáàâëåíà ôóíêöèÿ exif_get_app2.</p>
|
|
<p>11.03.16 - äîáàâëåíà ôóíêöèÿ exif_get_tag_id, èçìåíåíû íàçâàíèÿ íåêîòîðûõ ôóíêöèé (óáðàíî app1 ïîòîìó ÷òî îíè ìîãóò ðàáîòàòü íå òîëüêî ñ app1).</p>
|
|
</body>
|
|
</html> |