xref: /PHP-7.2/ext/exif/tests/exif010.phpt (revision 375631c3)
1--TEST--
2Check for exif_read_data, JPEG with IFD and EXIF data in Intel 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__).'/image010.jpg'));
11?>
12--EXPECTF--
13array(28) {
14  ["FileName"]=>
15  string(12) "image010.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(19) "ANY_TAG, IFD0, EXIF"
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(0)
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(246)
67  ["ExposureTime"]=>
68  string(5) "1/125"
69  ["FNumber"]=>
70  string(3) "8/1"
71  ["ISOSpeedRatings"]=>
72  int(80)
73  ["DateTimeOriginal"]=>
74  string(19) "2008:06:19 01:47:53"
75  ["DateTimeDigitized"]=>
76  string(19) "2008:06:19 01:47:53"
77  ["MeteringMode"]=>
78  int(5)
79  ["LightSource"]=>
80  int(4)
81  ["Flash"]=>
82  int(7)
83  ["FocalLength"]=>
84  string(4) "29/5"
85  ["ExifImageWidth"]=>
86  int(1)
87  ["ExifImageLength"]=>
88  int(1)
89}
90--CREDIT--
91Eric Stewart <ericleestewart@gmail.com>
92