exif000.phpt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --TEST--
  2. Check for exif_read_data default behaviour
  3. --EXTENSIONS--
  4. exif
  5. --INI--
  6. output_handler=
  7. zlib.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. */
  15. print_r(exif_read_data(__DIR__.'/test2.jpg'));
  16. ?>
  17. --EXPECTF--
  18. Array
  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. [Copyright] => Photo (c) M.Boerger
  42. [UserComment] => ASCII
  43. [THUMBNAIL] => Array
  44. (
  45. [JPEGInterchangeFormat] => 134
  46. [JPEGInterchangeFormatLength] => 523
  47. )
  48. [COMMENT] => Array
  49. (
  50. [0] => Comment #1.
  51. [1] => Comment #2.
  52. [2] => Comment #3end
  53. )
  54. )