xref: /php-src/ext/exif/tests/exif000.phpt (revision bd9f4fa6)
1--TEST--
2Check for exif_read_data default behaviour
3--EXTENSIONS--
4exif
5--INI--
6output_handler=
7zlib.output_compression=0
8--FILE--
9<?php
10/*
11  test1.jpg is a 1*1 image that does not contain any Exif/Comment information
12  test2.jpg is the same image but contains Exif/Comment information and a
13            copy of test1.jpg as a thumbnail.
14*/
15print_r(exif_read_data(__DIR__.'/test2.jpg'));
16?>
17--EXPECTF--
18Array
19(
20    [FileName] => test2.jpg
21    [FileDateTime] => %d
22    [FileSize] => 1240
23    [FileType] => 2
24    [MimeType] => image/jpeg
25    [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, COMMENT
26    [COMPUTED] => Array
27        (
28            [html] => width="1" height="1"
29            [Height] => 1
30            [Width] => 1
31            [IsColor] => 1
32            [ByteOrderMotorola] => 1
33            [UserComment] => Exif test image.
34            [UserCommentEncoding] => ASCII
35            [Copyright] => Photo (c) M.Boerger, Edited by M.Boerger.
36            [Copyright.Photographer] => Photo (c) M.Boerger
37            [Copyright.Editor] => Edited by M.Boerger.
38            [Thumbnail.FileType] => 2
39            [Thumbnail.MimeType] => image/jpeg
40        )
41
42    [Copyright] => Photo (c) M.Boerger
43    [UserComment] => ASCII
44    [THUMBNAIL] => Array
45        (
46            [JPEGInterchangeFormat] => 134
47            [JPEGInterchangeFormatLength] => 523
48        )
49
50    [COMMENT] => Array
51        (
52            [0] => Comment #1.
53            [1] => Comment #2.
54            [2] => Comment #3end
55        )
56
57)
58