Skip to content

Commit

Permalink
Add test images from pel/pel (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake authored Jun 12, 2020
1 parent b2c83a3 commit bf5d409
Show file tree
Hide file tree
Showing 25 changed files with 6,999 additions and 84 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ script:
#- php examples/dump-media.php -d test/image_files/camera_samples/apple-iphone6s.jpg-rewrite.img
#- php examples/dump-media.php -d -w test/image_files/camera_samples/apple-iphone7.JPG
#- php examples/dump-media.php -d test/image_files/camera_samples/apple-iphone7.JPG-rewrite.img
- php examples/dump-media.php -d -w test/image_files/camera_samples/apple-iphone11.jpg
#- php examples/dump-media.php -d -w test/image_files/camera_samples/apple-iphone11.jpg
#- php examples/dump-media.php -d -w test/image_files/camera_samples/nikon-e5000.jpg
#- php examples/dump-media.php -d test/image_files/camera_samples/nikon-e5000.jpg-rewrite.img
#- php examples/dump-media.php -d test/image_files/camera_samples/pentax-istDS.jpg
#- php examples/dump-media.php -d test/image_files/camera_samples/pentax-istDS.jpg-rewrite.img
- php examples/dump-media.php -d test/image_files/broken_images/pel-141.jpg
- php examples/dump-media.php -d -w test/image_files/broken_images/pel-152.jpg
- php examples/dump-media.php -d test/image_files/broken_images/pel-152.jpg-rewrite.img
#- php examples/dump-media.php -d test/image_files/broken_images/gh-10-a.jpg
#- php examples/dump-media.php -d test/image_files/broken_images/gh-10-a.jpg-rewrite.img
#- php examples/dump-media.php test/image_files/broken_images/gh-10-b.jpg
Expand All @@ -89,6 +92,8 @@ script:
#- php examples/dump-media.php -d -w test/image_files/no-exif.jpg
#- php examples/dump-media.php -d test/image_files/no-exif.jpg-rewrite.img
#- php examples/dump-media.php -d test/image_files/sample-1.tiff
- php examples/dump-media.php -d -w test/image_files/pel-157.tiff
- php examples/dump-media.php -d test/image_files/pel-157.tiff-rewrite.img
#- php examples/dump-media.php -d test/image_files/broken_images/gh-11.jpg-rewrite.img
#- php examples/dump-media.php -d test/image_files/camera_samples/olympus-c765uz.jpg
#- php examples/dump-media.php -d -w test/image_files/camera_samples/fujifilm_x_a5.jpg
Expand Down
45 changes: 45 additions & 0 deletions specs/Ifd/Any.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ items:
R98: 'R98 - DCF basic file (sRGB)'
THM: 'THM - DCF thumbnail file'
2:
components: 4
entryClass: FileEye\MediaProbe\Entry\Version
exiftool:
-
name: InteropVersion
Expand Down Expand Up @@ -606,6 +608,8 @@ items:
DOMNode: 'IFD0:Software'
desc: Software
306:
components: 20
entryClass: FileEye\MediaProbe\Entry\Time
exifReadData:
key: DateTime
exiftool:
Expand Down Expand Up @@ -1310,6 +1314,8 @@ items:
DOMNode: 'IFD0:YCbCrCoefficients'
desc: 'Y Cb Cr Coefficients'
530:
__todo: 'adjust decoding'
entryClass: FileEye\MediaProbe\Entry\IfdYCbCrSubSampling
exifReadData:
key: YCbCrSubSampling
exiftool:
Expand Down Expand Up @@ -1363,6 +1369,7 @@ items:
DOMNode: 'ExifIFD:StripRowCounts'
desc: 'Strip Row Counts'
700:
__todo: 'add ifd for XMP tags'
entryClass: FileEye\MediaProbe\Entry\IfdApplicationNotes
exifReadData:
key: ExtensibleMetadataPlatform
Expand Down Expand Up @@ -1764,6 +1771,7 @@ items:
DOMNode: 'ExifIFD:BatteryLevel'
desc: 'Battery Level'
33432:
entryClass: FileEye\MediaProbe\Entry\IfdCopyright
exifReadData:
key: Copyright
exiftool:
Expand All @@ -1775,6 +1783,8 @@ items:
DOMNode: 'IFD0:Copyright'
desc: Copyright
33434:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifExposureTime
exifReadData:
key: ExposureTime
exiftool:
Expand All @@ -1786,6 +1796,8 @@ items:
DOMNode: 'ExifIFD:ExposureTime'
desc: 'Exposure Time'
33437:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifFNumber
exifReadData:
key: FNumber
exiftool:
Expand Down Expand Up @@ -2485,6 +2497,8 @@ items:
DOMNode: 'ExifIFD:FedexEDR'
desc: 'Fedex EDR'
36864:
components: 4
entryClass: FileEye\MediaProbe\Entry\Version
exifReadData:
key: ExifVersion
exiftool:
Expand All @@ -2496,6 +2510,8 @@ items:
DOMNode: 'ExifIFD:ExifVersion'
desc: 'Exif Version'
36867:
components: 20
entryClass: FileEye\MediaProbe\Entry\Time
exifReadData:
key: DateTimeOriginal
exiftool:
Expand All @@ -2508,6 +2524,8 @@ items:
DOMNode: 'ExifIFD:DateTimeOriginal'
desc: 'Date/Time Original'
36868:
components: 20
entryClass: FileEye\MediaProbe\Entry\Time
exifReadData:
key: DateTimeDigitized
exiftool:
Expand Down Expand Up @@ -2559,6 +2577,8 @@ items:
DOMNode: 'ExifIFD:OffsetTimeDigitized'
desc: 'Offset Time Digitized'
37121:
components: 4
entryClass: FileEye\MediaProbe\Entry\ExifComponentsConfiguration
exifReadData:
key: ComponentsConfiguration
exiftool:
Expand Down Expand Up @@ -2590,6 +2610,8 @@ items:
DOMNode: 'ExifIFD:CompressedBitsPerPixel'
desc: 'Compressed Bits Per Pixel'
37377:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifShutterSpeedValue
exifReadData:
key: ShutterSpeedValue
exiftool:
Expand All @@ -2601,6 +2623,8 @@ items:
DOMNode: 'ExifIFD:ShutterSpeedValue'
desc: 'Shutter Speed Value'
37378:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifApertureValue
exifReadData:
key: ApertureValue
exiftool:
Expand All @@ -2612,6 +2636,8 @@ items:
DOMNode: 'ExifIFD:ApertureValue'
desc: 'Aperture Value'
37379:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifBrightnessValue
exifReadData:
key: BrightnessValue
exiftool:
Expand All @@ -2623,6 +2649,8 @@ items:
DOMNode: 'ExifIFD:BrightnessValue'
desc: 'Brightness Value'
37380:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifExposureBiasValue
exifReadData:
key: ExposureBiasValue
exiftool:
Expand All @@ -2646,6 +2674,8 @@ items:
DOMNode: 'ExifIFD:MaxApertureValue'
desc: 'Max Aperture Value'
37382:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifSubjectDistance
exifReadData:
key: SubjectDistance
exiftool:
Expand Down Expand Up @@ -2754,6 +2784,8 @@ items:
93: 'Auto, Fired, Red-eye reduction, Return not detected'
95: 'Auto, Fired, Red-eye reduction, Return detected'
37386:
components: 1
entryClass: FileEye\MediaProbe\Entry\ExifFocalLength
exifReadData:
key: FocalLength
exiftool:
Expand Down Expand Up @@ -2879,6 +2911,7 @@ items:
DOMNode: 'ExifIFD:ImageHistory'
desc: 'Image History'
37396:
entryClass: FileEye\MediaProbe\Entry\ExifSubjectArea
exifReadData:
key: SubjectLocation
exiftool:
Expand Down Expand Up @@ -2972,6 +3005,10 @@ items:
DOMNode: 'ExifIFD:StoNits'
desc: 'Sto Nits'
37500:
name: MakerNote
title: 'Maker Note'
format: Undefined
entryClass: FileEye\MediaProbe\Entry\ExifMakerNote
exiftool:
-
name: MakerNoteApple
Expand Down Expand Up @@ -3576,6 +3613,7 @@ items:
DOMNode: 'ExifIFD:MakerNoteUnknown'
desc: 'Maker Note Unknown'
37510:
entryClass: FileEye\MediaProbe\Entry\ExifUserComment
exifReadData:
key: UserComment
exiftool:
Expand Down Expand Up @@ -3714,6 +3752,7 @@ items:
DOMNode: 'ExifIFD:CameraElevationAngle'
desc: 'Camera Elevation Angle'
40091:
entryClass: FileEye\MediaProbe\Entry\WindowsString
exifReadData:
key: Title
exiftool:
Expand All @@ -3724,6 +3763,7 @@ items:
DOMNode: 'IFD0:XPTitle'
desc: 'XP Title'
40092:
entryClass: FileEye\MediaProbe\Entry\WindowsString
exifReadData:
key: Comments
exiftool:
Expand All @@ -3734,6 +3774,7 @@ items:
DOMNode: 'IFD0:XPComment'
desc: 'XP Comment'
40093:
entryClass: FileEye\MediaProbe\Entry\WindowsString
exifReadData:
key: Author
exiftool:
Expand All @@ -3745,6 +3786,7 @@ items:
DOMNode: 'IFD0:XPAuthor'
desc: 'XP Author'
40094:
entryClass: FileEye\MediaProbe\Entry\WindowsString
exifReadData:
key: Keywords
exiftool:
Expand All @@ -3755,6 +3797,7 @@ items:
DOMNode: 'IFD0:XPKeywords'
desc: 'XP Keywords'
40095:
entryClass: FileEye\MediaProbe\Entry\WindowsString
exifReadData:
key: Subject
exiftool:
Expand All @@ -3765,6 +3808,8 @@ items:
DOMNode: 'IFD0:XPSubject'
desc: 'XP Subject'
40960:
components: 4
entryClass: FileEye\MediaProbe\Entry\Version
exifReadData:
key: FlashPixVersion
exiftool:
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Jpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function parseData(DataElement $data_element): void
*/
protected function getJpegSegmentIdOffset(DataElement $data_element, int $offset): int
{
for ($i = $offset; $i < $offset + 7; $i++) {
for ($i = $offset; $i < $offset + 128; $i++) {
if ($data_element->getByte($i) === Jpeg::JPEG_DELIMITER && $data_element->getByte($i + 1) !== Jpeg::JPEG_DELIMITER) {
return $i;
}
Expand Down
Loading

0 comments on commit bf5d409

Please sign in to comment.