php-src/ext/exif/tests/001.phpt
Marcus Boerger 50d957cd7a Ini settings for internal encoding and decoding of Unicode and JIS formatted user comments.
@- Ini settings for encoding/decoding Unicode/JIS user comments (Marcus)
2002-04-12 16:35:56 +00:00

28 lines
956 B
PHP

--TEST--
Check for exif_read_data
--SKIPIF--
<?php if (!extension_loaded("exif")) print "skip";?>
--POST--
--GET--
--FILE--
<?php
/*
test1.jpg is a 1*1 image that does not contain any Exif/Comment information
test2.jpg is the same image but contains Exif/Comment information and a
copy of test1.jpg as a thumbnail.
*/
$image = exif_read_data('./ext/exif/tests/test2.jpg','',true,false);
$accept = '';
foreach($image as $idx=>$section) {
$accept .= $section;
foreach($section as $name=>$value) {
if ( $idx!='FILE' || $name!='FileDateTime') {
$accept .= substr($name,0,2);
$accept .= $value;
}
}
}
echo $accept;
?>
--EXPECT--
ArrayFitest2.jpgFi1240Fi2SeANY_TAG, IFD0, THUMBNAIL, COMMENTArrayhtwidth="1" height="1"He1Wi1Is1By1UsExif test image.UsASCIICoPhoto (c) M.Boerger, Edited by M.Boerger.CoPhoto (c) M.BoergerCoEdited by M.Boerger.ArrayCoPhoto (c) M.BoergerUsASCIIArrayJP134JP523Array0Comment #1.1Comment #2.2Comment #3end