From 19f29fb1d6dae4dc9e290c2cc7112401c328a59a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 10 Feb 2009 16:28:50 +0000 Subject: Exif data is now collected when an image is added. --- modules/exif/tests/Exif_Test.php | 56 ++++++++++++++++++++++++++++++++++++++ modules/exif/tests/data/image.jpg | Bin 0 -> 11211 bytes 2 files changed, 56 insertions(+) create mode 100644 modules/exif/tests/Exif_Test.php create mode 100644 modules/exif/tests/data/image.jpg (limited to 'modules/exif/tests') diff --git a/modules/exif/tests/Exif_Test.php b/modules/exif/tests/Exif_Test.php new file mode 100644 index 00000000..4ab1e21e --- /dev/null +++ b/modules/exif/tests/Exif_Test.php @@ -0,0 +1,56 @@ + "Camera Maker", "value" => "Pentax Corporation"), + array("caption" => "Camera Model", "value" => "PENTAX K10D"), + array("caption" => "Aperture", "value" => "f/2.8"), + array("caption" => "Color Space", "value" => "Uncalibrated"), + array("caption" => "Exposure Value", "value" => "4294.67 EV"), + array("caption" => "Exposure Program", "value" => "Program"), + array("caption" => "Flash", "value" => "No Flash"), + array("caption" => "Focal Length", "value" => "50 mm"), + array("caption" => "ISO", "value" => "6553700"), + array("caption" => "Metering Mode", "value" => "Multi-Segment"), + array("caption" => "Shutter Speed", "value" => "1/60 sec"), + array("caption" => "Date/Time", "value" => "2008:03:17 17:41:25") + ); + $this->assert_equal($expected, $exif); + + $exif = exif::get($photo, false); + $expected = array_merge($expected, array( + array("caption" => "Copyright", "value" => "(C) 2008 - T. Almdal"), + array("caption" => "Orientation", "value" => "1: Normal (0 deg)"), + array("caption" => "Resolution Unit", "value" => "Inch"), + array("caption" => "X Resolution", "value" => "240 dots per ResolutionUnit"), + array("caption" => "Y Resolution", "value" => "240 dots per ResolutionUnit"), + array("caption" => "Brightness Value", "value" => "0"), + array("caption" => "Scene Type", "value" => "0"), + array("caption" => "Subject Distance", "value" => "0"), + )); + $this->assert_equal($expected, $exif); + } +} \ No newline at end of file diff --git a/modules/exif/tests/data/image.jpg b/modules/exif/tests/data/image.jpg new file mode 100644 index 00000000..e5ee1458 Binary files /dev/null and b/modules/exif/tests/data/image.jpg differ -- cgit v1.2.3