xref: /PHP-5.3/ext/exif/tests/exif015.phpt (revision 375631c3)
1--TEST--
2Check for exif_read_data, JPEG with IFD, EXIF and GPS data in Motorola byte-order.
3--SKIPIF--
4<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
5--INI--
6output_handler=
7zlib.output_compression=0
8--FILE--
9<?php
10var_dump(exif_read_data(dirname(__FILE__).'/image015.jpg'));
11?>
12--EXPECTF--
13array(37) {
14  ["FileName"]=>
15  string(12) "image015.jpg"
16  ["FileDateTime"]=>
17  int(%d)
18  ["FileSize"]=>
19  int(%d)
20  ["FileType"]=>
21  int(2)
22  ["MimeType"]=>
23  string(10) "image/jpeg"
24  ["SectionsFound"]=>
25  string(24) "ANY_TAG, IFD0, EXIF, GPS"
26  ["COMPUTED"]=>
27  array(9) {
28    ["html"]=>
29    string(20) "width="1" height="1""
30    ["Height"]=>
31    int(1)
32    ["Width"]=>
33    int(1)
34    ["IsColor"]=>
35    int(1)
36    ["ByteOrderMotorola"]=>
37    int(1)
38    ["ApertureFNumber"]=>
39    string(5) "f/8.0"
40    ["Copyright"]=>
41    string(24) "Eric Stewart, Hex Editor"
42    ["Copyright.Photographer"]=>
43    string(12) "Eric Stewart"
44    ["Copyright.Editor"]=>
45    string(10) "Hex Editor"
46  }
47  ["ImageDescription"]=>
48  string(15) "My description."
49  ["Make"]=>
50  string(11) "OpenShutter"
51  ["Model"]=>
52  string(8) "OS 1.0.0"
53  ["XResolution"]=>
54  string(4) "72/1"
55  ["YResolution"]=>
56  string(4) "72/1"
57  ["ResolutionUnit"]=>
58  int(2)
59  ["DateTime"]=>
60  string(19) "2008:06:19 01:47:53"
61  ["Artist"]=>
62  string(12) "Eric Stewart"
63  ["Copyright"]=>
64  string(12) "Eric Stewart"
65  ["Exif_IFD_Pointer"]=>
66  int(258)
67  ["GPS_IFD_Pointer"]=>
68  int(460)
69  ["ExposureTime"]=>
70  string(5) "1/125"
71  ["FNumber"]=>
72  string(3) "8/1"
73  ["ISOSpeedRatings"]=>
74  int(80)
75  ["DateTimeOriginal"]=>
76  string(19) "2008:06:19 01:47:53"
77  ["DateTimeDigitized"]=>
78  string(19) "2008:06:19 01:47:53"
79  ["MeteringMode"]=>
80  int(5)
81  ["LightSource"]=>
82  int(4)
83  ["Flash"]=>
84  int(7)
85  ["FocalLength"]=>
86  string(4) "29/5"
87  ["ExifImageWidth"]=>
88  int(1)
89  ["ExifImageLength"]=>
90  int(1)
91  ["GPSVersion"]=>
92  string(4) "��"
93  ["GPSLatitudeRef"]=>
94  string(1) "N"
95  ["GPSLatitude"]=>
96  array(3) {
97    [0]=>
98    string(4) "33/1"
99    [1]=>
100    string(4) "37/1"
101    [2]=>
102    string(3) "0/1"
103  }
104  ["GPSLongitudeRef"]=>
105  string(1) "W"
106  ["GPSLongitude"]=>
107  array(3) {
108    [0]=>
109    string(4) "84/1"
110    [1]=>
111    string(3) "7/1"
112    [2]=>
113    string(3) "0/1"
114  }
115  ["GPSAltitudeRef"]=>
116  string(1) "�"
117  ["GPSAltitude"]=>
118  string(5) "295/1"
119  ["GPSTimeStamp"]=>
120  array(3) {
121    [0]=>
122    string(3) "1/1"
123    [1]=>
124    string(4) "47/1"
125    [2]=>
126    string(4) "53/1"
127  }
128}
129--CREDIT--
130Eric Stewart <ericleestewart@gmail.com>
131