/usr/share/doc/python-pyexiv2-doc/api.html is in python-pyexiv2-doc 0.3.2-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>API documentation — pyexiv2 0.3.2 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.3.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/pyexiv2.ico"/>
<link rel="top" title="pyexiv2 0.3.2 documentation" href="index.html" />
<link rel="next" title="Developers" href="developers.html" />
<link rel="prev" title="Tutorial" href="tutorial.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="tutorial.html" title="Tutorial"
accesskey="P">previous</a> |</li>
<li><a href="index.html">pyexiv2 0.3.2 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="api-documentation">
<h1>API documentation<a class="headerlink" href="#api-documentation" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-pyexiv2">
<span id="pyexiv2"></span><h2>pyexiv2<a class="headerlink" href="#module-pyexiv2" title="Permalink to this headline">¶</a></h2>
<dl class="data">
<dt id="pyexiv2.version_info">
<tt class="descclassname">pyexiv2.</tt><tt class="descname">version_info</tt><em class="property"> = (0, 3, 2)</em><a class="headerlink" href="#pyexiv2.version_info" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple containing the three components of the version number: major, minor, micro.</p>
</dd></dl>
<dl class="data">
<dt id="pyexiv2.__version__">
<tt class="descclassname">pyexiv2.</tt><tt class="descname">__version__</tt><em class="property"> = '0.3.2'</em><a class="headerlink" href="#pyexiv2.__version__" title="Permalink to this definition">¶</a></dt>
<dd><p>The version of the module as a string (major.minor.micro).</p>
</dd></dl>
<dl class="data">
<dt id="pyexiv2.exiv2_version_info">
<tt class="descclassname">pyexiv2.</tt><tt class="descname">exiv2_version_info</tt><em class="property"> = (0, 24, 0)</em><a class="headerlink" href="#pyexiv2.exiv2_version_info" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple containing the three components of the version number of libexiv2: major, minor, micro.</p>
</dd></dl>
<dl class="data">
<dt id="pyexiv2.__exiv2_version__">
<tt class="descclassname">pyexiv2.</tt><tt class="descname">__exiv2_version__</tt><em class="property"> = '0.24.0'</em><a class="headerlink" href="#pyexiv2.__exiv2_version__" title="Permalink to this definition">¶</a></dt>
<dd><p>The version of libexiv2 as a string (major.minor.micro).</p>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.metadata">
<span id="pyexiv2-metadata"></span><h2>pyexiv2.metadata<a class="headerlink" href="#module-pyexiv2.metadata" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="pyexiv2.metadata.ImageMetadata">
<em class="property">class </em><tt class="descclassname">pyexiv2.metadata.</tt><tt class="descname">ImageMetadata</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata" title="Permalink to this definition">¶</a></dt>
<dd><p>A container for all the metadata embedded in an image.</p>
<p>It provides convenient methods for the manipulation of EXIF, IPTC and XMP
metadata embedded in image files such as JPEG and TIFF files, using Python
types.
It also provides access to the previews embedded in an image.</p>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.__delitem__">
<tt class="descname">__delitem__</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.__delitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete a metadata tag for a given key.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<em>string</em>) – metadata key in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> may
be one of <tt class="docutils literal"><span class="pre">exif</span></tt>, <tt class="docutils literal"><span class="pre">iptc</span></tt> or <tt class="docutils literal"><span class="pre">xmp</span></tt>.</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Raises KeyError:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body">if the tag with the given key doesn’t exist</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.__getitem__">
<tt class="descname">__getitem__</tt><big>(</big><em>key</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.__getitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a metadata tag for a given key.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>key</strong> (<em>string</em>) – metadata key in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> may
be one of <tt class="docutils literal"><span class="pre">exif</span></tt>, <tt class="docutils literal"><span class="pre">iptc</span></tt> or <tt class="docutils literal"><span class="pre">xmp</span></tt>.</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Raises KeyError:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body">if the tag doesn’t exist</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.__setitem__">
<tt class="descname">__setitem__</tt><big>(</big><em>key</em>, <em>tag_or_value</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.__setitem__" title="Permalink to this definition">¶</a></dt>
<dd><p>Set a metadata tag for a given key.
If the tag was previously set, it is overwritten.
As a handy shortcut, a value may be passed instead of a fully formed
tag. The corresponding tag object will be instantiated.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>key</strong> (<em>string</em>) – metadata key in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> may
be one of <tt class="docutils literal"><span class="pre">exif</span></tt>, <tt class="docutils literal"><span class="pre">iptc</span></tt> or <tt class="docutils literal"><span class="pre">xmp</span></tt>.</li>
<li><strong>tag_or_value</strong> (<a class="reference internal" href="#pyexiv2.exif.ExifTag" title="pyexiv2.exif.ExifTag"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.exif.ExifTag</span></tt></a> or
<a class="reference internal" href="#pyexiv2.iptc.IptcTag" title="pyexiv2.iptc.IptcTag"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.iptc.IptcTag</span></tt></a> or
<a class="reference internal" href="#pyexiv2.xmp.XmpTag" title="pyexiv2.xmp.XmpTag"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.xmp.XmpTag</span></tt></a> or any valid value type) – an instance of the corresponding family of metadata
tag, or a value</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Raises KeyError:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body"><p class="first last">if the key is invalid</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.buffer">
<tt class="descname">buffer</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.buffer" title="Permalink to this definition">¶</a></dt>
<dd><p>The image buffer as a string.
If metadata has been modified, the data won’t be up-to-date until
<a class="reference internal" href="#pyexiv2.metadata.ImageMetadata.write" title="pyexiv2.metadata.ImageMetadata.write"><tt class="xref py py-meth docutils literal"><span class="pre">write()</span></tt></a> has been called.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.comment">
<tt class="descname">comment</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.comment" title="Permalink to this definition">¶</a></dt>
<dd><p>The image comment.</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.copy">
<tt class="descname">copy</tt><big>(</big><em>other</em>, <em>exif=True</em>, <em>iptc=True</em>, <em>xmp=True</em>, <em>comment=True</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Copy the metadata to another image.
The metadata in the destination is overridden. In particular, if the
destination contains e.g. EXIF data and the source doesn’t, it will be
erased in the destination, unless explicitly omitted.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> (<a class="reference internal" href="#pyexiv2.metadata.ImageMetadata" title="pyexiv2.metadata.ImageMetadata"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.metadata.ImageMetadata</span></tt></a>) – the destination metadata to copy to (it must have been
<a class="reference internal" href="#pyexiv2.metadata.ImageMetadata.read" title="pyexiv2.metadata.ImageMetadata.read"><tt class="xref py py-meth docutils literal"><span class="pre">read()</span></tt></a> beforehand)</li>
<li><strong>exif</strong> (<em>boolean</em>) – whether to copy the EXIF metadata</li>
<li><strong>iptc</strong> (<em>boolean</em>) – whether to copy the IPTC metadata</li>
<li><strong>xmp</strong> (<em>boolean</em>) – whether to copy the XMP metadata</li>
<li><strong>comment</strong> (<em>boolean</em>) – whether to copy the image comment</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.dimensions">
<tt class="descname">dimensions</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.dimensions" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple containing the width and height of the image, expressed in
pixels.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.exif_keys">
<tt class="descname">exif_keys</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.exif_keys" title="Permalink to this definition">¶</a></dt>
<dd><p>List of the keys of the available EXIF tags.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pyexiv2.metadata.ImageMetadata.from_buffer">
<em class="property">classmethod </em><tt class="descname">from_buffer</tt><big>(</big><em>buffer</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.from_buffer" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate an image container from an image buffer.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>buffer</strong> (<em>string</em>) – a buffer containing image data</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.iptc_charset">
<tt class="descname">iptc_charset</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.iptc_charset" title="Permalink to this definition">¶</a></dt>
<dd><p>An optional character set the IPTC data is encoded in.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.iptc_keys">
<tt class="descname">iptc_keys</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.iptc_keys" title="Permalink to this definition">¶</a></dt>
<dd><p>List of the keys of the available IPTC tags.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.mime_type">
<tt class="descname">mime_type</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.mime_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The mime type of the image, as a string.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.previews">
<tt class="descname">previews</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.previews" title="Permalink to this definition">¶</a></dt>
<dd><p>List of the previews available in the image, sorted by increasing
size.</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.read">
<tt class="descname">read</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Read the metadata embedded in the associated image.
It is necessary to call this method once before attempting to access
the metadata (an exception will be raised if trying to access metadata
before calling this method).</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.metadata.ImageMetadata.write">
<tt class="descname">write</tt><big>(</big><em>preserve_timestamps=False</em><big>)</big><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the metadata back to the image.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>preserve_timestamps</strong> (<em>boolean</em>) – whether to preserve the file’s original
timestamps (access time and modification
time)</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.metadata.ImageMetadata.xmp_keys">
<tt class="descname">xmp_keys</tt><a class="headerlink" href="#pyexiv2.metadata.ImageMetadata.xmp_keys" title="Permalink to this definition">¶</a></dt>
<dd><p>List of the keys of the available XMP tags.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.exif">
<span id="pyexiv2-exif"></span><h2>pyexiv2.exif<a class="headerlink" href="#module-pyexiv2.exif" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="pyexiv2.exif.ExifValueError">
<em class="property">exception </em><tt class="descclassname">pyexiv2.exif.</tt><tt class="descname">ExifValueError</tt><big>(</big><em>value</em>, <em>type</em><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception raised when failing to parse the <em>value</em> of an EXIF tag.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Attribute value:</th></tr>
<tr class="field-odd field"><td> </td><td class="field-body">the value that fails to be parsed</td>
</tr>
<tr class="field-even field"><th class="field-name">Attribute type:</th><td class="field-body">the EXIF type of the tag</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.exif.ExifTag">
<em class="property">class </em><tt class="descclassname">pyexiv2.exif.</tt><tt class="descname">ExifTag</tt><big>(</big><em>key</em>, <em>value=None</em>, <em>_tag=None</em><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifTag" title="Permalink to this definition">¶</a></dt>
<dd><p>An EXIF tag.</p>
<p>Here is a correspondance table between the EXIF types and the possible
python types the value of a tag may take:</p>
<ul class="simple">
<li>Ascii: <tt class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">datetime.date</span></tt>, string</li>
<li>Byte, SByte: string</li>
<li>Comment: string</li>
<li>Long, SLong: [list of] long</li>
<li>Short, SShort: [list of] int</li>
<li>Rational, SRational: [list of] <tt class="xref py py-class docutils literal"><span class="pre">fractions.Fraction</span></tt> if available
(Python ≥ 2.6) or <a class="reference internal" href="#pyexiv2.utils.Rational" title="pyexiv2.utils.Rational"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.utils.Rational</span></tt></a></li>
<li>Undefined: string</li>
</ul>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.description">
<tt class="descname">description</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.description" title="Permalink to this definition">¶</a></dt>
<dd><p>The description of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.human_value">
<tt class="descname">human_value</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.human_value" title="Permalink to this definition">¶</a></dt>
<dd><p>A (read-only) human-readable representation
of the value of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.key">
<tt class="descname">key</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.key" title="Permalink to this definition">¶</a></dt>
<dd><p>The key of the tag in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> = <tt class="docutils literal"><span class="pre">exif</span></tt>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.label">
<tt class="descname">label</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.label" title="Permalink to this definition">¶</a></dt>
<dd><p>The title (label) of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.name">
<tt class="descname">name</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the tag (this is also the third part of the key).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.raw_value">
<tt class="descname">raw_value</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.raw_value" title="Permalink to this definition">¶</a></dt>
<dd><p>The raw value of the tag as a string.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.section_description">
<tt class="descname">section_description</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.section_description" title="Permalink to this definition">¶</a></dt>
<dd><p>The description of the tag’s section.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.section_name">
<tt class="descname">section_name</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.section_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the tag’s section.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.type">
<tt class="descname">type</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The EXIF type of the tag (one of Ascii, Byte, SByte, Comment, Short,
SShort, Long, SLong, Rational, SRational, Undefined).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifTag.value">
<tt class="descname">value</tt><a class="headerlink" href="#pyexiv2.exif.ExifTag.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value of the tag as a python object.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.exif.ExifThumbnail">
<em class="property">class </em><tt class="descclassname">pyexiv2.exif.</tt><tt class="descname">ExifThumbnail</tt><big>(</big><em>_metadata</em><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail" title="Permalink to this definition">¶</a></dt>
<dd><p>A thumbnail image optionally embedded in the IFD1 segment of the EXIF data.</p>
<p>The image is either a TIFF or a JPEG image.</p>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifThumbnail.data">
<tt class="descname">data</tt><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.data" title="Permalink to this definition">¶</a></dt>
<dd><p>The raw thumbnail data. Setting it is restricted to a buffer in the JPEG format.</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.exif.ExifThumbnail.erase">
<tt class="descname">erase</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.erase" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the thumbnail from the EXIF data.
Removes all Exif.Thumbnail.*, i.e. Exif IFD1 tags.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifThumbnail.extension">
<tt class="descname">extension</tt><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.extension" title="Permalink to this definition">¶</a></dt>
<dd><p>The file extension of the preview image with a leading dot
(e.g. <tt class="docutils literal"><span class="pre">.jpg</span></tt>).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.exif.ExifThumbnail.mime_type">
<tt class="descname">mime_type</tt><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.mime_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The mime type of the preview image (e.g. <tt class="docutils literal"><span class="pre">image/jpeg</span></tt>).</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.exif.ExifThumbnail.set_from_file">
<tt class="descname">set_from_file</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.set_from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the EXIF thumbnail to the JPEG image path.
This sets only the <tt class="docutils literal"><span class="pre">Compression</span></tt>, <tt class="docutils literal"><span class="pre">JPEGInterchangeFormat</span></tt> and
<tt class="docutils literal"><span class="pre">JPEGInterchangeFormatLength</span></tt> tags, which is not all the thumbnail
EXIF information mandatory according to the EXIF standard
(but it is enough to work with the thumbnail).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>string</em>) – path to a JPEG file to set the thumbnail to</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.exif.ExifThumbnail.write_to_file">
<tt class="descname">write_to_file</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#pyexiv2.exif.ExifThumbnail.write_to_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the thumbnail image to a file on disk.
The file extension will be automatically appended to the path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>string</em>) – path to write the thumbnail to (without an extension)</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.iptc">
<span id="pyexiv2-iptc"></span><h2>pyexiv2.iptc<a class="headerlink" href="#module-pyexiv2.iptc" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="pyexiv2.iptc.IptcValueError">
<em class="property">exception </em><tt class="descclassname">pyexiv2.iptc.</tt><tt class="descname">IptcValueError</tt><big>(</big><em>value</em>, <em>type</em><big>)</big><a class="headerlink" href="#pyexiv2.iptc.IptcValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception raised when failing to parse the <em>value</em> of an IPTC tag.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Attribute value:</th></tr>
<tr class="field-odd field"><td> </td><td class="field-body">the value that fails to be parsed</td>
</tr>
<tr class="field-even field"><th class="field-name">Attribute type:</th><td class="field-body">the IPTC type of the tag</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.iptc.IptcTag">
<em class="property">class </em><tt class="descclassname">pyexiv2.iptc.</tt><tt class="descname">IptcTag</tt><big>(</big><em>key</em>, <em>values=None</em>, <em>_tag=None</em><big>)</big><a class="headerlink" href="#pyexiv2.iptc.IptcTag" title="Permalink to this definition">¶</a></dt>
<dd><p>An IPTC tag.</p>
<p>This tag can have several values (tags that have the <em>repeatable</em> property).</p>
<p>Here is a correspondance table between the IPTC types and the possible
python types the value of a tag may take:</p>
<ul class="simple">
<li>Short: int</li>
<li>String: string</li>
<li>Date: <tt class="xref py py-class docutils literal"><span class="pre">datetime.date</span></tt></li>
<li>Time: <tt class="xref py py-class docutils literal"><span class="pre">datetime.time</span></tt></li>
<li>Undefined: string</li>
</ul>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.description">
<tt class="descname">description</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.description" title="Permalink to this definition">¶</a></dt>
<dd><p>The description of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.key">
<tt class="descname">key</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.key" title="Permalink to this definition">¶</a></dt>
<dd><p>The key of the tag in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> = <tt class="docutils literal"><span class="pre">iptc</span></tt>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.name">
<tt class="descname">name</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the tag (this is also the third part of the key).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.photoshop_name">
<tt class="descname">photoshop_name</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.photoshop_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The Photoshop name of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.raw_value">
<tt class="descname">raw_value</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.raw_value" title="Permalink to this definition">¶</a></dt>
<dd><p>The raw values of the tag as a list of strings.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.record_description">
<tt class="descname">record_description</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.record_description" title="Permalink to this definition">¶</a></dt>
<dd><p>The description of the tag’s record.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.record_name">
<tt class="descname">record_name</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.record_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the tag’s record.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.repeatable">
<tt class="descname">repeatable</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.repeatable" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether the tag is repeatable (accepts several values).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.title">
<tt class="descname">title</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.title" title="Permalink to this definition">¶</a></dt>
<dd><p>The title (label) of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.type">
<tt class="descname">type</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The IPTC type of the tag (one of Short, String, Date, Time,
Undefined).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.iptc.IptcTag.value">
<tt class="descname">value</tt><a class="headerlink" href="#pyexiv2.iptc.IptcTag.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The values of the tag as a list of python objects.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.xmp">
<span id="pyexiv2-xmp"></span><h2>pyexiv2.xmp<a class="headerlink" href="#module-pyexiv2.xmp" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="pyexiv2.xmp.register_namespace">
<tt class="descclassname">pyexiv2.xmp.</tt><tt class="descname">register_namespace</tt><big>(</big><em>name</em>, <em>prefix</em><big>)</big><a class="headerlink" href="#pyexiv2.xmp.register_namespace" title="Permalink to this definition">¶</a></dt>
<dd><p>Register a custom XMP namespace.</p>
<p>Overriding the prefix of a known or previously registered namespace is not
allowed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> (<em>string</em>) – the name of the custom namespace (ending with a <tt class="docutils literal"><span class="pre">/</span></tt>),
typically a URL (e.g. <a class="reference external" href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a>)</li>
<li><strong>prefix</strong> (<em>string</em>) – the prefix for the custom namespace (keys in this namespace
will be in the form <tt class="docutils literal"><span class="pre">Xmp.{prefix}.{something}</span></tt>)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>ValueError</strong> – if the name doesn’t end with a <tt class="docutils literal"><span class="pre">/</span></tt></li>
<li><strong>KeyError</strong> – if a namespace already exist with this prefix</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyexiv2.xmp.unregister_namespace">
<tt class="descclassname">pyexiv2.xmp.</tt><tt class="descname">unregister_namespace</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#pyexiv2.xmp.unregister_namespace" title="Permalink to this definition">¶</a></dt>
<dd><p>Unregister a custom XMP namespace.</p>
<p>A custom namespace is identified by its name, <strong>not</strong> by its prefix.</p>
<p>Attempting to unregister an unknown namespace raises an error, as does
attempting to unregister a builtin namespace.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>name</strong> (<em>string</em>) – the name of the custom namespace (ending with a <tt class="docutils literal"><span class="pre">/</span></tt>),
typically a URL (e.g. <a class="reference external" href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a>)</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>ValueError</strong> – if the name doesn’t end with a <tt class="docutils literal"><span class="pre">/</span></tt></li>
<li><strong>KeyError</strong> – if the namespace is unknown or a builtin namespace</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyexiv2.xmp.unregister_namespaces">
<tt class="descclassname">pyexiv2.xmp.</tt><tt class="descname">unregister_namespaces</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.xmp.unregister_namespaces" title="Permalink to this definition">¶</a></dt>
<dd><p>Unregister all custom XMP namespaces.</p>
<p>Builtin namespaces are not unregistered.</p>
<p>This function always succeeds.</p>
</dd></dl>
<dl class="exception">
<dt id="pyexiv2.xmp.XmpValueError">
<em class="property">exception </em><tt class="descclassname">pyexiv2.xmp.</tt><tt class="descname">XmpValueError</tt><big>(</big><em>value</em>, <em>type</em><big>)</big><a class="headerlink" href="#pyexiv2.xmp.XmpValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception raised when failing to parse the <em>value</em> of an XMP tag.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Attribute value:</th></tr>
<tr class="field-odd field"><td> </td><td class="field-body">the value that fails to be parsed</td>
</tr>
<tr class="field-even field"><th class="field-name">Attribute type:</th><td class="field-body">the XMP type of the tag</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.xmp.XmpTag">
<em class="property">class </em><tt class="descclassname">pyexiv2.xmp.</tt><tt class="descname">XmpTag</tt><big>(</big><em>key</em>, <em>value=None</em>, <em>_tag=None</em><big>)</big><a class="headerlink" href="#pyexiv2.xmp.XmpTag" title="Permalink to this definition">¶</a></dt>
<dd><p>An XMP tag.</p>
<p>Here is a correspondance table between the XMP types and the possible
python types the value of a tag may take:</p>
<ul class="simple">
<li>alt, bag, seq: list of the contained simple type</li>
<li>lang alt: dict of (language-code: value)</li>
<li>Boolean: boolean</li>
<li>Colorant: <em>[not implemented yet]</em></li>
<li>Date: <tt class="xref py py-class docutils literal"><span class="pre">datetime.date</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></tt></li>
<li>Dimensions: <em>[not implemented yet]</em></li>
<li>Font: <em>[not implemented yet]</em></li>
<li>GPSCoordinate: <a class="reference internal" href="#pyexiv2.utils.GPSCoordinate" title="pyexiv2.utils.GPSCoordinate"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.utils.GPSCoordinate</span></tt></a></li>
<li>Integer: int</li>
<li>Locale: <em>[not implemented yet]</em></li>
<li>MIMEType: 2-tuple of strings</li>
<li>Rational: <tt class="xref py py-class docutils literal"><span class="pre">fractions.Fraction</span></tt> if available (Python ≥ 2.6) or
<a class="reference internal" href="#pyexiv2.utils.Rational" title="pyexiv2.utils.Rational"><tt class="xref py py-class docutils literal"><span class="pre">pyexiv2.utils.Rational</span></tt></a></li>
<li>Real: <em>[not implemented yet]</em></li>
<li>AgentName, ProperName, Text: unicode string</li>
<li>Thumbnail: <em>[not implemented yet]</em></li>
<li>URI, URL: string</li>
<li>XPath: <em>[not implemented yet]</em></li>
</ul>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.description">
<tt class="descname">description</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.description" title="Permalink to this definition">¶</a></dt>
<dd><p>The description of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.key">
<tt class="descname">key</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.key" title="Permalink to this definition">¶</a></dt>
<dd><p>The key of the tag in the dotted form
<tt class="docutils literal"><span class="pre">familyName.groupName.tagName</span></tt> where <tt class="docutils literal"><span class="pre">familyName</span></tt> = <tt class="docutils literal"><span class="pre">xmp</span></tt>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.name">
<tt class="descname">name</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the tag (this is also the third part of the key).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.raw_value">
<tt class="descname">raw_value</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.raw_value" title="Permalink to this definition">¶</a></dt>
<dd><p>The raw value of the tag as a [list of] string(s).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.title">
<tt class="descname">title</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.title" title="Permalink to this definition">¶</a></dt>
<dd><p>The title (label) of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.type">
<tt class="descname">type</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.type" title="Permalink to this definition">¶</a></dt>
<dd><p>The XMP type of the tag.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.xmp.XmpTag.value">
<tt class="descname">value</tt><a class="headerlink" href="#pyexiv2.xmp.XmpTag.value" title="Permalink to this definition">¶</a></dt>
<dd><p>The value of the tag as a [list of] python object(s).</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.preview">
<span id="pyexiv2-preview"></span><h2>pyexiv2.preview<a class="headerlink" href="#module-pyexiv2.preview" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="pyexiv2.preview.Preview">
<em class="property">class </em><tt class="descclassname">pyexiv2.preview.</tt><tt class="descname">Preview</tt><big>(</big><em>preview</em><big>)</big><a class="headerlink" href="#pyexiv2.preview.Preview" title="Permalink to this definition">¶</a></dt>
<dd><p>A preview image (properties and data buffer) embedded in image metadata.</p>
<dl class="attribute">
<dt id="pyexiv2.preview.Preview.data">
<tt class="descname">data</tt><a class="headerlink" href="#pyexiv2.preview.Preview.data" title="Permalink to this definition">¶</a></dt>
<dd><p>The preview image data buffer.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.preview.Preview.dimensions">
<tt class="descname">dimensions</tt><a class="headerlink" href="#pyexiv2.preview.Preview.dimensions" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple containing the width and height of the preview image
in pixels.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.preview.Preview.extension">
<tt class="descname">extension</tt><a class="headerlink" href="#pyexiv2.preview.Preview.extension" title="Permalink to this definition">¶</a></dt>
<dd><p>The file extension of the preview image with a leading dot
(e.g. <tt class="docutils literal"><span class="pre">.jpg</span></tt>).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.preview.Preview.mime_type">
<tt class="descname">mime_type</tt><a class="headerlink" href="#pyexiv2.preview.Preview.mime_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The mime type of the preview image (e.g. <tt class="docutils literal"><span class="pre">image/jpeg</span></tt>).</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.preview.Preview.size">
<tt class="descname">size</tt><a class="headerlink" href="#pyexiv2.preview.Preview.size" title="Permalink to this definition">¶</a></dt>
<dd><p>The size of the preview image in bytes.</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.preview.Preview.write_to_file">
<tt class="descname">write_to_file</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#pyexiv2.preview.Preview.write_to_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Write the preview image to a file on disk.
The file extension will be automatically appended to the path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>string</em>) – path to write the preview to (without an extension)</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyexiv2.utils">
<span id="pyexiv2-utils"></span><h2>pyexiv2.utils<a class="headerlink" href="#module-pyexiv2.utils" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="pyexiv2.utils.undefined_to_string">
<tt class="descclassname">pyexiv2.utils.</tt><tt class="descname">undefined_to_string</tt><big>(</big><em>undefined</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.undefined_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert an undefined string into its corresponding sequence of bytes.
The undefined string must contain the ascii codes of a sequence of bytes,
separated by white spaces (e.g. “48 50 50 49” will be converted into
“0221”).
The Undefined type is part of the EXIF specification.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>undefined</strong> (<em>string</em>) – an undefined string</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the corresponding decoded string</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyexiv2.utils.string_to_undefined">
<tt class="descclassname">pyexiv2.utils.</tt><tt class="descname">string_to_undefined</tt><big>(</big><em>sequence</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.string_to_undefined" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string into its undefined form.
The undefined form contains a sequence of ascii codes separated by white
spaces (e.g. “0221” will be converted into “48 50 50 49”).
The Undefined type is part of the EXIF specification.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sequence</strong> (<em>string</em>) – a sequence of bytes</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the corresponding undefined string</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyexiv2.utils.make_fraction">
<tt class="descclassname">pyexiv2.utils.</tt><tt class="descname">make_fraction</tt><big>(</big><em>*args</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.make_fraction" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a fraction.</p>
<p>The type of the returned object depends on the availability of the
fractions module in the standard library (Python ≥ 2.6).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Raises TypeError:</th></tr>
<tr class="field-odd field"><td> </td><td class="field-body">if the arguments do not match the expected format for a
fraction</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.utils.Rational">
<em class="property">class </em><tt class="descclassname">pyexiv2.utils.</tt><tt class="descname">Rational</tt><big>(</big><em>numerator</em>, <em>denominator</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational" title="Permalink to this definition">¶</a></dt>
<dd><p>A class representing a rational number.</p>
<p>Its numerator and denominator are read-only properties.</p>
<p>Do not use this class directly to instantiate a rational number.
Instead, use <a class="reference internal" href="#pyexiv2.utils.make_fraction" title="pyexiv2.utils.make_fraction"><tt class="xref py py-func docutils literal"><span class="pre">make_fraction()</span></tt></a>.</p>
<dl class="method">
<dt id="pyexiv2.utils.Rational.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare two rational numbers for equality.</p>
<p>Two rational numbers are equal if their reduced forms are equal.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#pyexiv2.utils.Rational" title="pyexiv2.utils.Rational"><tt class="xref py py-class docutils literal"><span class="pre">Rational</span></tt></a>) – the rational number to compare to self for equality</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if equal, False otherwise</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.utils.Rational.__repr__">
<tt class="descname">__repr__</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational.__repr__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the official string representation of the object</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.utils.Rational.__str__">
<tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational.__str__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a string representation of the rational number</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.Rational.denominator">
<tt class="descname">denominator</tt><a class="headerlink" href="#pyexiv2.utils.Rational.denominator" title="Permalink to this definition">¶</a></dt>
<dd><p>The denominator of the rational number.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="pyexiv2.utils.Rational.from_string">
<em class="property">static </em><tt class="descname">from_string</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational.from_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate a <a class="reference internal" href="#pyexiv2.utils.Rational" title="pyexiv2.utils.Rational"><tt class="xref py py-class docutils literal"><span class="pre">Rational</span></tt></a> from a string formatted as
<tt class="docutils literal"><span class="pre">[-]numerator/denominator</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<em>string</em>) – a string representation of a rational number</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the rational number parsed</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#pyexiv2.utils.Rational" title="pyexiv2.utils.Rational"><tt class="xref py py-class docutils literal"><span class="pre">Rational</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Raises ValueError:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body">if the format of the string is invalid</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.Rational.numerator">
<tt class="descname">numerator</tt><a class="headerlink" href="#pyexiv2.utils.Rational.numerator" title="Permalink to this definition">¶</a></dt>
<dd><p>The numerator of the rational number.</p>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.utils.Rational.to_float">
<tt class="descname">to_float</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.utils.Rational.to_float" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a floating point number approximation of the value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pyexiv2.utils.GPSCoordinate">
<em class="property">class </em><tt class="descclassname">pyexiv2.utils.</tt><tt class="descname">GPSCoordinate</tt><big>(</big><em>degrees</em>, <em>minutes</em>, <em>seconds</em>, <em>direction</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate" title="Permalink to this definition">¶</a></dt>
<dd><p>A class representing GPS coordinates (e.g. a latitude or a longitude).</p>
<p>Its attributes (degrees, minutes, seconds, direction) are read-only
properties.</p>
<dl class="method">
<dt id="pyexiv2.utils.GPSCoordinate.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare two GPS coordinates for equality.</p>
<p>Two coordinates are equal if and only if all their components are equal.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>other</strong> (<a class="reference internal" href="#pyexiv2.utils.GPSCoordinate" title="pyexiv2.utils.GPSCoordinate"><tt class="xref py py-class docutils literal"><span class="pre">GPSCoordinate</span></tt></a>) – the GPS coordinate to compare to self for equality</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if equal, False otherwise</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyexiv2.utils.GPSCoordinate.__str__">
<tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.__str__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a string representation of the GPS coordinate conforming to the
XMP specification</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.GPSCoordinate.degrees">
<tt class="descname">degrees</tt><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.degrees" title="Permalink to this definition">¶</a></dt>
<dd><p>The degrees component of the coordinate.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.GPSCoordinate.direction">
<tt class="descname">direction</tt><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.direction" title="Permalink to this definition">¶</a></dt>
<dd><p>The direction component of the coordinate.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="pyexiv2.utils.GPSCoordinate.from_string">
<em class="property">static </em><tt class="descname">from_string</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.from_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate a <a class="reference internal" href="#pyexiv2.utils.GPSCoordinate" title="pyexiv2.utils.GPSCoordinate"><tt class="xref py py-class docutils literal"><span class="pre">GPSCoordinate</span></tt></a> from a string formatted as
<tt class="docutils literal"><span class="pre">DDD,MM,SSk</span></tt> or <tt class="docutils literal"><span class="pre">DDD,MM.mmk</span></tt> where <tt class="docutils literal"><span class="pre">DDD</span></tt> is a number of degrees,
<tt class="docutils literal"><span class="pre">MM</span></tt> is a number of minutes, <tt class="docutils literal"><span class="pre">SS</span></tt> is a number of seconds, <tt class="docutils literal"><span class="pre">mm</span></tt> is
a fraction of minutes, and <tt class="docutils literal"><span class="pre">k</span></tt> is a single character N, S, E, W
indicating a direction (north, south, east, west).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<em>string</em>) – a string representation of a GPS coordinate</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the GPS coordinate parsed</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#pyexiv2.utils.GPSCoordinate" title="pyexiv2.utils.GPSCoordinate"><tt class="xref py py-class docutils literal"><span class="pre">GPSCoordinate</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Raises ValueError:</th></tr>
<tr class="field-even field"><td> </td><td class="field-body">if the format of the string is invalid</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.GPSCoordinate.minutes">
<tt class="descname">minutes</tt><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.minutes" title="Permalink to this definition">¶</a></dt>
<dd><p>The minutes component of the coordinate.</p>
</dd></dl>
<dl class="attribute">
<dt id="pyexiv2.utils.GPSCoordinate.seconds">
<tt class="descname">seconds</tt><a class="headerlink" href="#pyexiv2.utils.GPSCoordinate.seconds" title="Permalink to this definition">¶</a></dt>
<dd><p>The seconds component of the coordinate.</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/pyexiv2-big-192x192.png" alt="Logo"/>
</a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">API documentation</a><ul>
<li><a class="reference internal" href="#module-pyexiv2">pyexiv2</a></li>
<li><a class="reference internal" href="#module-pyexiv2.metadata">pyexiv2.metadata</a></li>
<li><a class="reference internal" href="#module-pyexiv2.exif">pyexiv2.exif</a></li>
<li><a class="reference internal" href="#module-pyexiv2.iptc">pyexiv2.iptc</a></li>
<li><a class="reference internal" href="#module-pyexiv2.xmp">pyexiv2.xmp</a></li>
<li><a class="reference internal" href="#module-pyexiv2.preview">pyexiv2.preview</a></li>
<li><a class="reference internal" href="#module-pyexiv2.utils">pyexiv2.utils</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="tutorial.html"
title="previous chapter">Tutorial</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="developers.html"
title="next chapter">Developers</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/api.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers"
>next</a> |</li>
<li class="right" >
<a href="tutorial.html" title="Tutorial"
>previous</a> |</li>
<li><a href="index.html">pyexiv2 0.3.2 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2006-2015, Olivier Tilloy.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>
</html>
|