]> granicus.if.org Git - php/commitdiff
- add a test for makernote (#72682)
authorRemi Collet <remi@php.net>
Wed, 3 Aug 2016 16:33:26 +0000 (18:33 +0200)
committerRemi Collet <remi@php.net>
Wed, 3 Aug 2016 16:33:26 +0000 (18:33 +0200)
- reduce image size
- add panasonic.jpg sample

ext/exif/tests/bug72735/bug72682.phpt [new file with mode: 0644]
ext/exif/tests/bug72735/bug72735.phpt
ext/exif/tests/bug72735/nokia.jpg
ext/exif/tests/bug72735/panasonic.jpg [new file with mode: 0644]
ext/exif/tests/bug72735/samsung.jpg

diff --git a/ext/exif/tests/bug72735/bug72682.phpt b/ext/exif/tests/bug72735/bug72682.phpt
new file mode 100644 (file)
index 0000000..b3f1779
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Bug #72735 MakerNote regression
+--SKIPIF--
+<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
+--FILE--
+<?php
+foreach (['nokia.jpg', 'samsung.jpg', 'panasonic.jpg'] as $picture) {
+       echo $picture . ': ';
+
+       $info = exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . $picture);
+       var_dump($info['MakerNote']);
+} 
+?>
+--EXPECTF--
+nokia.jpg: string(5) "Nikon"
+samsung.jpg: NULL
+panasonic.jpg: string(9) "Panasonic"
index 24b2a04f354a13b70744415057d3f8df887a5a33..38d9ed2199768bb1387f6db46f05da79a1b829d5 100644 (file)
@@ -4,7 +4,7 @@ Bug #72735 (Samsung picture thumb not read (zero size))
 <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
 --FILE--
 <?php
-foreach (['nokia.jpg', 'samsung.jpg'] as $picture) {
+foreach (['nokia.jpg', 'samsung.jpg', 'panasonic.jpg'] as $picture) {
        echo $picture . ': ';
 
        $len = strlen(exif_thumbnail(__DIR__ . DIRECTORY_SEPARATOR . $picture));
@@ -21,3 +21,4 @@ foreach (['nokia.jpg', 'samsung.jpg'] as $picture) {
 --EXPECTF--
 nokia.jpg: int(5899)
 samsung.jpg: int(5778)
+panasonic.jpg: int(651)
index 48367bfb84e944ba0be6362bdcd33cae86aed41c..f402d765a66d665aed4e2d032332cd72331609ad 100644 (file)
Binary files a/ext/exif/tests/bug72735/nokia.jpg and b/ext/exif/tests/bug72735/nokia.jpg differ
diff --git a/ext/exif/tests/bug72735/panasonic.jpg b/ext/exif/tests/bug72735/panasonic.jpg
new file mode 100644 (file)
index 0000000..35713e6
Binary files /dev/null and b/ext/exif/tests/bug72735/panasonic.jpg differ
index 70096066a8cb1fe2336d8574d2290055305bd390..1ec51eaf0c17958858fbbaaa703845342afcac2f 100644 (file)
Binary files a/ext/exif/tests/bug72735/samsung.jpg and b/ext/exif/tests/bug72735/samsung.jpg differ