jpeg-comment-iso8859-1.jpg, jpeg-comment-binary.jpg, jpeg-xmp-psir.jpg,
jpeg-xmp-alt.jpg, animated.gif, exif-user-comment.jpg, animated-xmp.gif,
iptc-timetest-invalid.jpg, jpeg-iptc-bad-hash.jpg, iptc-timetest.jpg,
-xmp.png, nonanimated.gif, exif-gps.jpg, jpeg-xmp-psir.xmp, jpeg-iptc-good-hash.jpg
+xmp.png, nonanimated.gif, exif-gps.jpg, jpeg-xmp-psir.xmp, jpeg-iptc-good-hash.jpg,
+jpeg-padding-even.jpg, jpeg-padding-odd.jpg
Are all by Bawolff. I don't think they contain enough originality to
claim copyright, but on the off chance they do, feel free to use them
however you feel fit, without restriction.
$this->filePath = dirname( __FILE__ ) . '/../../data/media/';
}
- public function testUtf8Comment() {
- $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-comment-utf.jpg' );
+ /**
+ * We also use this test to test padding bytes don't
+ * screw stuff up
+ *
+ * @param $file filename
+ *
+ * @dataProvider dataUtf8Comment
+ */
+ public function testUtf8Comment( $file ) {
+ $res = JpegMetadataExtractor::segmentSplitter( $this->filePath . $file );
$this->assertEquals( array( 'UTF-8 JPEG Comment — ¼' ), $res['COM'] );
}
+ public function dataUtf8Comment() {
+ return array(
+ array( 'jpeg-comment-utf.jpg' ),
+ array( 'jpeg-padding-even.jpg' ),
+ array( 'jpeg-padding-odd.jpg' ),
+ );
+ }
/** The file is iso-8859-1, but it should get auto converted */
public function testIso88591Comment() {
$res = JpegMetadataExtractor::segmentSplitter( $this->filePath . 'jpeg-comment-iso8859-1.jpg' );