helly Fri Oct 25 06:59:52 2002 EDT Added files: /php4/ext/exif/tests exif001.phpt exif002.phpt exif003.phpt exif004.phpt exif005.phpt
Removed files: /php4/ext/exif/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt Log: New naming scheme Index: php4/ext/exif/tests/exif001.phpt +++ php4/ext/exif/tests/exif001.phpt --TEST-- Check for exif_read_data --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --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. */ var_dump(exif_read_data('./ext/exif/tests/test2.jpg','',true,false)); ?> --EXPECTF-- array(5) { ["FILE"]=> array(6) { ["FileName"]=> string(9) "test2.jpg" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(1240) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(33) "ANY_TAG, IFD0, THUMBNAIL, COMMENT" } ["COMPUTED"]=> array(12) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(1) ["UserComment"]=> string(16) "Exif test image." ["UserCommentEncoding"]=> string(5) "ASCII" ["Copyright"]=> string(41) "Photo (c) M.Boerger, Edited by M.Boerger." ["Copyright.Photographer"]=> string(19) "Photo (c) M.Boerger" ["Copyright.Editor"]=> string(20) "Edited by M.Boerger." ["Thumbnail.FileType"]=> int(2) ["Thumbnail.MimeType"]=> string(10) "image/jpeg" } ["IFD0"]=> array(2) { ["Copyright"]=> string(19) "Photo (c) M.Boerger" ["UserComment"]=> string(5) "ASCII" } ["THUMBNAIL"]=> array(2) { ["JPEGInterchangeFormat"]=> int(134) ["JPEGInterchangeFormatLength"]=> int(523) } ["COMMENT"]=> array(3) { [0]=> string(11) "Comment #1." [1]=> string(11) "Comment #2." [2]=> string(13) "Comment #3end" } } Index: php4/ext/exif/tests/exif002.phpt +++ php4/ext/exif/tests/exif002.phpt --TEST-- Check for exif_thumbnail --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --INI-- magic_quotes_runtime=0 output_handler= zlib.output_compression=0 --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. */ $infile = './ext/exif/tests/test1.jpg'; echo md5_file($infile).'_'.filesize($infile); $thumb = exif_thumbnail('./ext/exif/tests/test2.jpg'); echo " == "; echo md5($thumb).'_'.strlen($thumb); echo "\n"; ?> --EXPECT-- 27bbfd9fc10e1e663d749f5225447905_523 == 27bbfd9fc10e1e663d749f5225447905_523 Index: php4/ext/exif/tests/exif003.phpt +++ php4/ext/exif/tests/exif003.phpt --TEST-- Check for exif_read_data, Unicode user comment --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --INI-- output_handler = zlib.output_compression = Off exif.decode_unicode_motorola=UCS-2BE exif.encode_unicode=ISO-8859-15 --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. test3.jpg is the same as test2.jpg but with a UNICODE UserComment: ÄÖ&Üßäöü */ var_dump(exif_read_data('./ext/exif/tests/test3.jpg','',true,false)); ?> --EXPECTF-- array(5) { ["FILE"]=> array(6) { ["FileName"]=> string(9) "test3.jpg" ["FileDateTime"]=> int(%s) ["FileSize"]=> int(1240) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(33) "ANY_TAG, IFD0, THUMBNAIL, COMMENT" } ["COMPUTED"]=> array(12) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(1) ["UserComment"]=> string(7) "ÄÖÜßäöü" ["UserCommentEncoding"]=> string(7) "UNICODE" ["Copyright"]=> string(41) "Photo (c) M.Boerger, Edited by M.Boerger." ["Copyright.Photographer"]=> string(19) "Photo (c) M.Boerger" ["Copyright.Editor"]=> string(20) "Edited by M.Boerger." ["Thumbnail.FileType"]=> int(2) ["Thumbnail.MimeType"]=> string(10) "image/jpeg" } ["IFD0"]=> array(2) { ["Copyright"]=> string(19) "Photo (c) M.Boerger" ["UserComment"]=> string(7) "UNICODE" } ["THUMBNAIL"]=> array(2) { ["JPEGInterchangeFormat"]=> int(134) ["JPEGInterchangeFormatLength"]=> int(523) } ["COMMENT"]=> array(3) { [0]=> string(11) "Comment #1." [1]=> string(11) "Comment #2." [2]=> string(13) "Comment #3end" } } Index: php4/ext/exif/tests/exif004.phpt +++ php4/ext/exif/tests/exif004.phpt --TEST-- Check for exif_read_data, Unicode WinXP tags --SKIPIF-- <?php if (!extension_loaded('exif')) die('skip exif extension not available'); if (!extension_loaded('mbstring')) die('skip mbstring extension not available'); ?> --INI-- output_handler = zlib.output_compression = Off exif.decode_unicode_intel=UCS-2LE exif.decode_unicode_motorola=UCS-2BE exif.encode_unicode=ISO-8859-1 --FILE-- <?php /* test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP */ $image = exif_read_data('./ext/exif/tests/test4.jpg','',true,false); echo var_dump($image['WINXP']); ?> --EXPECT-- array(5) { ["Subject"]=> string(10) "Subject..." ["Keywords"]=> string(11) "Keywords..." ["Author"]=> string(9) "Rui Carmo" ["Comments"]=> string(29) "Comments Line2 Line3 Line4" ["Title"]=> string(8) "Title..." } Index: php4/ext/exif/tests/exif005.phpt +++ php4/ext/exif/tests/exif005.phpt --TEST-- Check for exif_read_data, unusual IFD start --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php /* test5.jpg is a 1*1 image that contain an Exif section with ifd start at 00000009h */ $image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false); var_dump($image['IFD0']); ?> --EXPECT-- array(2) { ["ImageDescription"]=> string(11) "Ifd00000009" ["DateTime"]=> string(19) "2002:10:18 20:06:00" } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php