forked from KolibriOS/kolibrios
f787c9d578
1) optimize code 2) add documentation git-svn-id: svn://kolibrios.org@5007 a494cfbc-eb01-0410-851d-a64ba20cac60
132 lines
4.9 KiB
HTML
132 lines
4.9 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_app1_tag</a></li>
|
|
<li><a href="#f_3">exif_get_app1_child</a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li><a href="#const">Êîíñòàíòû äëÿ ôóíêöèè exif_get_app1_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>Ïîñëåäíåå îáíîâëåíèå áèáëèîòåêè 18.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 ñìåùåíèå äîáàâëÿåìîå ê óêàçàòåëÿì â òåãàõ
|
|
dd 0 ;+8 ïàðàìåòð, îòâå÷àþùèé çà ïîðÿäîê ñëåäîâàíèÿ áàéòîâ</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 dd 0,0,0</pre>
|
|
<p>ãäå open_file - óêàçàòåëü íà äàííûå ôàéëà èçîáðàæåíèÿ (ïîêà ïîääåðæèâàþòñÿ òîëüêî *.jpg è *.jpeg).</p>
|
|
<p>h_app1 - ñòðóêòóðà äëÿ çàïîìèíàíèÿ íà÷àëà Exif äàííûõ.</p>
|
|
|
|
<h4><a name="f_2">exif_get_app1_tag</a></h4>
|
|
<p>Çàïîëíÿåò òåêñòîâóþ ñòðîêó èìåíåì ïàðàìåòðà èç Exif è åãî çíà÷åíèåì. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_app1_tag], h_app1,3,txt_buf,80
|
|
...
|
|
h_app1 dd 0,0,0
|
|
txt_buf rb 80</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà çàïîëåííàÿ â exif_get_app1 èëè â exif_get_app1_child.</p>
|
|
<p>3 - ïîðÿäêîâûé íîìåð ïàðàìåòðà.</p>
|
|
<p>txt_buf - òåêñòîâûé áóôåð äëÿ çàïîëíåíèÿ.</p>
|
|
<p>80 - ìàêñèìàëüíàÿ äëèíà òåêñòà.</p>
|
|
|
|
<h4><a name="f_3">exif_get_app1_child</a></h4>
|
|
<p>Åñòü ïðîñòûå òåãè ñ èíôîðìàöèåé à åñòü òåãè óêàçûâàþùèå íà ñïèñêè äðóãèõ òåãîâ. Ýòà ôóíêöèÿ áåðåò óêàçàòåëü íà íà÷àëî ñïèñêà äî÷åðíèõ òåãîâ. Ïðèìåð:</p>
|
|
<pre>stdcall [exif_get_app1_child], h_app1,h_child,0x8769
|
|
...
|
|
h_app1 dd 0,0,0
|
|
h_child dd 0,0,0</pre>
|
|
<p>ãäå h_app1 - ñòðóêòóðà çàïîëåííàÿ â exif_get_app1 èëè â exif_get_app1_child.</p>
|
|
<p>h_child - ñòðóêòóðà äëÿ çàïîëåíèÿ äàííûõ ñïèñêà äî÷åðíèõ òåãîâ.</p>
|
|
<p>0x8769 - êîä òåãà (íàõîäÿùåãîñÿ â ñïèñêå òåãîâ h_app1), êîòîðûé ÿâëÿåòñÿ óêàçàòåëåì íà ñïèñîê äðóãèõ äî÷åðíèõ òåãîâ.</p>
|
|
<p> äàíîì ïðèìåðå ôóíêöèÿ áåðåò òåã 0x8769 è ïûòàåòñÿ íàéòè åãî â ñïèñêå h_app1, åñëè íàõîäèò òî çàïîëíÿåò ïî íåìó çíà÷åíèÿ â ñòðóêòóðå h_child. Äàëåå ê ñïèñêó h_child ìîæíî ïðèìåíÿòü ôóíêöèþ exif_get_app1_tag äëÿ âçÿòèÿ çíà÷åíèÿ ýòèõ òåãîâ. Ñ ïîìîùüþ ýòîé ôóíêöèè ìû êàê áû ïåðåõîäèì âíóòðü íåêîé "ïàïêè" ñ òåãàìè, êîòîðûå ñðàçó äîñòàòü íå ìîæåì.</p>
|
|
|
|
<h1><a name="const">Êîíñòàíòû äëÿ ôóíêöèè exif_get_app1_child</a></h1>
|
|
<p>Çäåñü ïðèâåäåíû íåêîòîðûå êîíñòàíòû, êîòîðûå ìîãóò èñïîëüçîâàòñÿ êàê 3-é ïàðàìåòð äëÿ ôóíêöèè exif_get_app1_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_mem</b>:</p>
|
|
<pre>align 4
|
|
import_exif:
|
|
exif_get_app1 dd sz_exif_get_app1
|
|
exif_get_app1_tag dd sz_exif_get_app1_tag
|
|
exif_get_app1_child dd sz_exif_get_app1_child
|
|
dd 0,0
|
|
sz_exif_get_app1 db 'exif_get_app1',0
|
|
sz_exif_get_app1_tag db 'exif_get_app1_tag',0
|
|
sz_exif_get_app1_child db 'exif_get_app1_child',0</pre>
|
|
|
|
<h1><a name="hist">Èñòîðèÿ</a></h1>
|
|
<p>15.07.14 - ïåðâàÿ âåðñèÿ áèáëèîòåêè, ïðèìåð èñïîëüçîâàíèÿ.</p>
|
|
</body>
|
|
</html> |