home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / Doc / libimghdr.tex / node1_ct.html < prev    next >
LaTeX Document  |  1997-01-17  |  2.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 53 74 | 61 6e 64 61 72 64 20 6d |ts of St|andard m|
|000000b0| 6f 64 75 6c 65 20 69 6d | 67 68 64 72 3c 2f 54 49 |odule im|ghdr</TI|
|000000c0| 54 4c 45 3e 0a 0a 3c 4d | 45 54 41 20 48 54 54 50 |TLE>..<M|ETA HTTP|
|000000d0| 2d 45 51 55 49 56 3d 22 | 43 6f 6e 74 65 6e 74 2d |-EQUIV="|Content-|
|000000e0| 54 79 70 65 22 20 43 4f | 4e 54 45 4e 54 3d 22 74 |Type" CO|NTENT="t|
|000000f0| 65 78 74 2f 68 74 6d 6c | 3b 20 63 68 61 72 73 65 |ext/html|; charse|
|00000100| 74 3d 75 74 66 2d 38 22 | 3e 0a 3c 4d 45 54 41 20 |t=utf-8"|>.<META |
|00000110| 4e 41 4d 45 3d 22 76 69 | 65 77 70 6f 72 74 22 20 |NAME="vi|ewport" |
|00000120| 43 4f 4e 54 45 4e 54 3d | 22 77 69 64 74 68 3d 64 |CONTENT=|"width=d|
|00000130| 65 76 69 63 65 2d 77 69 | 64 74 68 2c 20 69 6e 69 |evice-wi|dth, ini|
|00000140| 74 69 61 6c 2d 73 63 61 | 6c 65 3d 31 2e 30 22 3e |tial-sca|le=1.0">|
|00000150| 0a 3c 4d 45 54 41 20 4e | 41 4d 45 3d 22 47 65 6e |.<META N|AME="Gen|
|00000160| 65 72 61 74 6f 72 22 20 | 43 4f 4e 54 45 4e 54 3d |erator" |CONTENT=|
|00000170| 22 4c 61 54 65 58 32 48 | 54 4d 4c 20 76 32 30 32 |"LaTeX2H|TML v202|
|00000180| 32 22 3e 0a 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |2">..<LI|NK REL="|
|00000190| 53 54 59 4c 45 53 48 45 | 45 54 22 20 48 52 45 46 |STYLESHE|ET" HREF|
|000001a0| 3d 22 6c 69 62 69 6d 67 | 68 64 72 2e 63 73 73 22 |="libimg|hdr.css"|
|000001b0| 3e 0a 0a 3c 4c 49 4e 4b | 20 52 45 4c 3d 22 70 72 |>..<LINK| REL="pr|
|000001c0| 65 76 69 6f 75 73 22 20 | 48 52 45 46 3d 22 6c 69 |evious" |HREF="li|
|000001d0| 62 69 6d 67 68 64 72 5f | 6d 6e 2e 68 74 6d 6c 22 |bimghdr_|mn.html"|
|000001e0| 3e 0a 3c 4c 49 4e 4b 20 | 52 45 4c 3d 22 75 70 22 |>.<LINK |REL="up"|
|000001f0| 20 48 52 45 46 3d 22 6c | 69 62 69 6d 67 68 64 72 | HREF="l|ibimghdr|
|00000200| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 2f 48 45 41 |_mn.html|">.</HEA|
|00000210| 44 3e 0a 20 0a 3c 42 4f | 44 59 20 62 67 63 6f 6c |D>. .<BO|DY bgcol|
|00000220| 6f 72 3d 22 23 66 66 66 | 66 66 66 22 20 74 65 78 |or="#fff|fff" tex|
|00000230| 74 3d 22 23 30 30 30 30 | 30 30 22 20 6c 69 6e 6b |t="#0000|00" link|
|00000240| 3d 22 23 39 39 34 34 45 | 45 22 20 76 6c 69 6e 6b |="#9944E|E" vlink|
|00000250| 3d 22 23 30 30 30 30 66 | 66 22 20 61 6c 69 6e 6b |="#0000f|f" alink|
|00000260| 3d 22 23 30 30 66 66 30 | 30 22 3e 0a 0a 3c 48 31 |="#00ff0|0">..<H1|
|00000270| 3e 3c 41 20 49 44 3d 22 | 53 45 43 54 49 4f 4e 30 |><A ID="|SECTION0|
|00000280| 30 30 31 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00100000|00000000|
|00000290| 30 30 30 22 3e 0a 53 74 | 61 6e 64 61 72 64 20 6d |000">.St|andard m|
|000002a0| 6f 64 75 6c 65 20 69 6d | 67 68 64 72 3c 2f 41 3e |odule im|ghdr</A>|
|000002b0| 0a 3c 2f 48 31 3e 0a 69 | 6d 67 68 64 72 0a 0a 3c |.</H1>.i|mghdr..<|
|000002c0| 50 3e 0a 54 68 65 20 69 | 6d 67 68 64 72 20 6d 6f |P>.The i|mghdr mo|
|000002d0| 64 75 6c 65 20 64 65 74 | 65 72 6d 69 6e 65 73 20 |dule det|ermines |
|000002e0| 74 68 65 20 74 79 70 65 | 20 6f 66 20 69 6d 61 67 |the type| of imag|
|000002f0| 65 20 63 6f 6e 74 61 69 | 6e 65 64 20 69 6e 20 61 |e contai|ned in a|
|00000300| 0a 66 69 6c 65 20 6f 72 | 20 62 79 74 65 20 73 74 |.file or| byte st|
|00000310| 72 65 61 6d 2e 0a 0a 3c | 50 3e 0a 54 68 65 20 69 |ream...<|P>.The i|
|00000320| 6d 67 68 64 72 20 6d 6f | 64 75 6c 65 20 64 65 66 |mghdr mo|dule def|
|00000330| 69 6e 65 73 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |ines the| followi|
|00000340| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 3a 0a 0a 3c 50 |ng funct|ion:..<P|
|00000350| 3e 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |>..<P>.<|BR>.<IMG|
|00000360| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|00000370| 3a 20 31 39 36 2e 32 35 | 65 78 3b 20 76 65 72 74 |: 196.25|ex; vert|
|00000380| 69 63 61 6c 2d 61 6c 69 | 67 6e 3a 20 2d 30 2e 35 |ical-ali|gn: -0.5|
|00000390| 37 65 78 3b 20 22 20 53 | 52 43 3d 22 69 6d 67 31 |7ex; " S|RC="img1|
|000003a0| 2e 70 6e 67 22 0a 20 41 | 4c 54 3d 22 5c 62 65 67 |.png". A|LT="\beg|
|000003b0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 77 68 61 |in{funcd|esc}{wha|
|000003c0| 74 7d 7b 66 69 6c 65 6e | 61 6d 65 5c 6f 70 74 69 |t}{filen|ame\opti|
|000003d0| 6f 6e 61 6c 7b 5c 2c 20 | 68 7d 7d 0a 54 65 73 74 |onal{\, |h}}.Test|
|000003e0| 73 20 74 68 65 20 69 6d | 61 67 65 20 64 61 74 61 |s the im|age data|
|000003f0| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 2e 2e 2e 0a | contain|ed i....|
|00000400| 2e 2e 2e 67 6e 6f 72 65 | 64 20 61 6e 64 20 5c 76 |...gnore|d and \v|
|00000410| 61 72 7b 68 7d 20 69 73 | 20 61 73 73 75 6d 65 64 |ar{h} is| assumed|
|00000420| 20 74 6f 0a 63 6f 6e 74 | 61 69 6e 20 74 68 65 20 | to.cont|ain the |
|00000430| 62 79 74 65 20 73 74 72 | 65 61 6d 20 74 6f 20 74 |byte str|eam to t|
|00000440| 65 73 74 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |est..\en|d{funcde|
|00000450| 73 63 7d 22 3e 0a 3c 42 | 52 3e 0a 0a 3c 50 3e 0a |sc}">.<B|R>..<P>.|
|00000460| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 6d |The foll|owing im|
|00000470| 61 67 65 20 74 79 70 65 | 73 20 61 72 65 20 72 65 |age type|s are re|
|00000480| 63 6f 67 6e 69 7a 65 64 | 2c 20 61 73 20 6c 69 73 |cognized|, as lis|
|00000490| 74 65 64 20 62 65 6c 6f | 77 20 77 69 74 68 20 74 |ted belo|w with t|
|000004a0| 68 65 0a 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 |he.retur|n value |
|000004b0| 66 72 6f 6d 20 77 68 61 | 74 3a 0a 0a 3c 50 3e 0a |from wha|t:..<P>.|
|000004c0| 3c 44 4c 20 63 6c 61 73 | 73 3d 22 43 4f 4d 50 41 |<DL clas|s="COMPA|
|000004d0| 43 54 22 3e 0a 3c 44 54 | 3e 60 60 72 67 62 27 27 |CT">.<DT|>``rgb''|
|000004e0| 3c 2f 44 54 3e 0a 3c 44 | 44 3e 53 47 49 20 49 6d |</DT>.<D|D>SGI Im|
|000004f0| 67 4c 69 62 20 46 69 6c | 65 73 0a 0a 3c 50 3e 0a |gLib Fil|es..<P>.|
|00000500| 3c 2f 44 44 3e 0a 3c 44 | 54 3e 60 60 67 69 66 27 |</DD>.<D|T>``gif'|
|00000510| 27 3c 2f 44 54 3e 0a 3c | 44 44 3e 47 49 46 20 38 |'</DT>.<|DD>GIF 8|
|00000520| 37 61 20 61 6e 64 20 38 | 39 61 20 46 69 6c 65 73 |7a and 8|9a Files|
|00000530| 0a 0a 3c 50 3e 0a 3c 2f | 44 44 3e 0a 3c 44 54 3e |..<P>.</|DD>.<DT>|
|00000540| 60 60 70 62 6d 27 27 3c | 2f 44 54 3e 0a 3c 44 44 |``pbm''<|/DT>.<DD|
|00000550| 3e 50 6f 72 74 61 62 6c | 65 20 42 69 74 6d 61 70 |>Portabl|e Bitmap|
|00000560| 20 46 69 6c 65 73 0a 0a | 3c 50 3e 0a 3c 2f 44 44 | Files..|<P>.</DD|
|00000570| 3e 0a 3c 44 54 3e 60 60 | 70 67 6d 27 27 3c 2f 44 |>.<DT>``|pgm''</D|
|00000580| 54 3e 0a 3c 44 44 3e 50 | 6f 72 74 61 62 6c 65 20 |T>.<DD>P|ortable |
|00000590| 47 72 61 79 6d 61 70 20 | 46 69 6c 65 73 0a 0a 3c |Graymap |Files..<|
|000005a0| 50 3e 0a 3c 2f 44 44 3e | 0a 3c 44 54 3e 60 60 70 |P>.</DD>|.<DT>``p|
|000005b0| 70 6d 27 27 3c 2f 44 54 | 3e 0a 3c 44 44 3e 50 6f |pm''</DT|>.<DD>Po|
|000005c0| 72 74 61 62 6c 65 20 50 | 69 78 6d 61 70 20 46 69 |rtable P|ixmap Fi|
|000005d0| 6c 65 73 0a 0a 3c 50 3e | 0a 3c 2f 44 44 3e 0a 3c |les..<P>|.</DD>.<|
|000005e0| 44 54 3e 60 60 74 69 66 | 66 27 27 3c 2f 44 54 3e |DT>``tif|f''</DT>|
|000005f0| 0a 3c 44 44 3e 54 49 46 | 46 20 46 69 6c 65 73 0a |.<DD>TIF|F Files.|
|00000600| 0a 3c 50 3e 0a 3c 2f 44 | 44 3e 0a 3c 44 54 3e 60 |.<P>.</D|D>.<DT>`|
|00000610| 60 72 61 73 74 27 27 3c | 2f 44 54 3e 0a 3c 44 44 |`rast''<|/DT>.<DD|
|00000620| 3e 53 75 6e 20 52 61 73 | 74 65 72 20 46 69 6c 65 |>Sun Ras|ter File|
|00000630| 73 0a 0a 3c 50 3e 0a 3c | 2f 44 44 3e 0a 3c 44 54 |s..<P>.<|/DD>.<DT|
|00000640| 3e 60 60 78 62 6d 27 27 | 3c 2f 44 54 3e 0a 3c 44 |>``xbm''|</DT>.<D|
|00000650| 44 3e 58 20 42 69 74 6d | 61 70 20 46 69 6c 65 73 |D>X Bitm|ap Files|
|00000660| 0a 0a 3c 50 3e 0a 3c 2f | 44 44 3e 0a 3c 44 54 3e |..<P>.</|DD>.<DT>|
|00000670| 60 60 6a 70 65 67 27 27 | 3c 2f 44 54 3e 0a 3c 44 |``jpeg''|</DT>.<D|
|00000680| 44 3e 4a 50 45 47 20 64 | 61 74 61 20 69 6e 20 4a |D>JPEG d|ata in J|
|00000690| 49 46 46 20 66 6f 72 6d | 61 74 0a 3c 2f 44 44 3e |IFF form|at.</DD>|
|000006a0| 0a 3c 2f 44 4c 3e 0a 0a | 3c 50 3e 0a 59 6f 75 20 |.</DL>..|<P>.You |
|000006b0| 63 61 6e 20 65 78 74 65 | 6e 64 20 74 68 65 20 6c |can exte|nd the l|
|000006c0| 69 73 74 20 6f 66 20 66 | 69 6c 65 20 74 79 70 65 |ist of f|ile type|
|000006d0| 73 20 69 6d 67 68 64 72 | 20 63 61 6e 20 72 65 63 |s imghdr| can rec|
|000006e0| 6f 67 6e 69 7a 65 20 62 | 79 0a 61 70 70 65 6e 64 |ognize b|y.append|
|000006f0| 69 6e 67 20 74 6f 20 74 | 68 69 73 20 76 61 72 69 |ing to t|his vari|
|00000700| 61 62 6c 65 3a 0a 0a 3c | 50 3e 0a 3c 42 52 3e 0a |able:..<|P>.<BR>.|
|00000710| 3c 49 4d 47 0a 20 20 53 | 54 59 4c 45 3d 22 68 65 |<IMG. S|TYLE="he|
|00000720| 69 67 68 74 3a 20 32 2e | 31 37 65 78 3b 20 76 65 |ight: 2.|17ex; ve|
|00000730| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 31 37 |rtical-a|lign: 17|
|00000740| 36 2e 35 35 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |6.55ex; |" SRC="i|
|00000750| 6d 67 32 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg2.png"|. ALT="\|
|00000760| 62 65 67 69 6e 7b 64 61 | 74 61 64 65 73 63 7d 7b |begin{da|tadesc}{|
|00000770| 74 65 73 74 73 7d 0a 41 | 20 6c 69 73 74 20 6f 66 |tests}.A| list of|
|00000780| 20 66 75 6e 63 74 69 6f | 6e 73 20 70 65 72 66 6f | functio|ns perfo|
|00000790| 72 6d 69 6e 67 20 74 68 | 65 20 69 6e 64 69 76 69 |rming th|e indivi|
|000007a0| 64 75 61 6c 20 74 65 73 | 74 73 2e 20 45 61 63 2e |dual tes|ts. Eac.|
|000007b0| 2e 2e 0a 2e 2e 2e 68 65 | 20 69 6d 61 67 65 20 74 |......he| image t|
|000007c0| 79 70 65 20 69 66 0a 74 | 68 65 20 74 65 73 74 20 |ype if.t|he test |
|000007d0| 73 75 63 63 65 65 64 65 | 64 2c 20 6f 72 20 5c 63 |succeede|d, or \c|
|000007e0| 6f 64 65 7b 4e 6f 6e 65 | 7d 20 69 66 20 69 74 20 |ode{None|} if it |
|000007f0| 66 61 69 6c 65 64 2e 0a | 5c 65 6e 64 7b 64 61 74 |failed..|\end{dat|
|00000800| 61 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |adesc}">|.<BR>..<|
|00000810| 50 3e 0a 45 78 61 6d 70 | 6c 65 3a 0a 0a 3c 50 3e |P>.Examp|le:..<P>|
|00000820| 0a 3c 50 52 45 3e 0a 26 | 67 74 3b 26 67 74 3b 26 |.<PRE>.&|gt;&gt;&|
|00000830| 67 74 3b 20 69 6d 70 6f | 72 74 20 69 6d 67 68 64 |gt; impo|rt imghd|
|00000840| 72 0a 26 67 74 3b 26 67 | 74 3b 26 67 74 3b 20 69 |r.&gt;&g|t;&gt; i|
|00000850| 6d 67 68 64 72 2e 77 68 | 61 74 28 27 2f 74 6d 70 |mghdr.wh|at('/tmp|
|00000860| 2f 62 61 73 73 2e 67 69 | 66 27 29 0a 27 67 69 66 |/bass.gi|f').'gif|
|00000870| 27 0a 3c 2f 50 52 45 3e | 0a 3c 48 52 3e 0a 0a 3c |'.</PRE>|.<HR>..<|
|00000880| 2f 42 4f 44 59 3e 0a 3c | 2f 48 54 4d 4c 3e 0a |/BODY>.<|/HTML>. |
+--------+-------------------------+-------------------------+--------+--------+