Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
php examples/dump-media.php -d tests/media-samples/image/camera/canon_eos_850d_08.jpg
php examples/dump-media.php -d tests/media-samples/image/broken/canon-eos-650d.jpg
php examples/dump-media.php -d tests/media-samples/image/camera/COPYING
php examples/dump-media.php -d composer.json
php examples/dump-media.php -d tests/media-samples/image/exiftool/Canon1DmkIII.jpg
# php examples/dump-media.php -d tests/media-samples/image/broken/gh-10-b.jpg
# php examples/dump-media.php -d tests/media-samples/image/broken/gh-11.jpg
# php examples/dump-media.php -d tests/media-samples/image/broken/pel-176-RPT200076_03.jpg
Expand All @@ -73,16 +73,17 @@ jobs:
continue-on-error: true
run: ./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1

- name: "Run a static analysis with phpstan/phpstan"
run: vendor/bin/phpstan analyze
# continue-on-error: true

# Remove the comment to the lines below during development, to refresh the
# media file dumps.
# - name: Update media dumps
# run: php bin/fileeye-mediaprobe dump tests/media-samples tests/media-dumps

# - name: Upload media dumps
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: media-dumps
# path: tests/media-dumps/**/*.yml

- name: "Run a static analysis with phpstan/phpstan"
run: vendor/bin/phpstan analyze
2 changes: 1 addition & 1 deletion SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ An IFD is fully described by a single YAML file. The file name should convention

```
type: 'IFD0'
class: FileEye\MediaProbe\Block\Tiff\Ifd
class: FileEye\MediaProbe\Block\Media\Tiff\Ifd
alias:
- '0'
- 'Main'
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "GPL-3.0",
"require": {
"php": ">=8.2",
"ext-bcmath": "*",
"ext-gd": "*",
"ext-mbstring": "*",
"composer-runtime-api": "^2.0.0",
Expand All @@ -23,17 +24,17 @@
"bramus/monolog-colored-line-formatter": "^3",
"phpstan/extension-installer": "*",
"phpstan/phpstan-deprecation-rules": "^2",
"phpstan/phpstan": "^2",
"phpstan/phpstan-phpunit": "^2",
"phpstan/phpstan": "^2",
"phpunit/phpunit": "^11",
"slevomat/coding-standard": "^8.15",
"squizlabs/php_codesniffer": "*",
"symfony/console": "^7.2",
"symfony/filesystem": "^7.2",
"symfony/finder": "^7.2",
"symfony/process": "^7.2",
"symfony/var-dumper": "^7.2",
"symfony/yaml": "^7.2",
"slevomat/coding-standard": "^8.15"
"symfony/yaml": "^7.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ includes:
- phpstan-baseline.neon

parameters:
level: 2
level: 3
paths:
- src
- tests
Expand Down
14 changes: 14 additions & 0 deletions specs/ExiftoolFormat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ items:
format: Float
double:
format: Double
# ifd:
# 13, # IFD (with int32u format)
# unicode:
# 14, # UNICODE
# complex:
# 15, # COMPLEX
int64u:
format: Long64
int64s:
format: SignedLong64
# ifd64:
# 18, # IFD8 (with int64u format) [BigTIFF]
# utf8:
# 129,# UTF-8 (Exif 3.0)
# var_int16u is present in ExifMakerNotes\CanonVRD\Ver2
var_int16u:
format: Undefined
Expand Down
32 changes: 32 additions & 0 deletions specs/Format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,38 @@ items:
name: Double
title: 'Double'
length: 8
# 13:
# # IFD (with int32u format)
# name: Ifd
# title: 'Ifd'
# 14:
# # Unicode
# name: Unicode
# title: 'Unicode'
# 15:
# # Complex
# name: Complex
# title: 'Complex'
16:
# BigTIFF unsigned 64-bit integer.
name: Long64
title: 'Long (64-bit)'
length: 8
class: FileEye\MediaProbe\Entry\Core\Long64
17:
# BigTIFF signed 64-bit integer.
name: SignedLong64
title: 'SignedLong (64-bit)'
length: 8
class: FileEye\MediaProbe\Entry\Core\SignedLong64
# 18:
# # IFD8 (with int64u format) [BigTIFF]
# name: Ifd8
# title: 'Ifd8'
# 129:
# # UTF-8 (Exif 3.0)
# name: Utf8
# title: 'UTF-8'
1000:
# Unsigned 16-bit integer (Short), reversed byte order.
name: ShortRev
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
collection: ExifMakerNotes\Apple\Main
name: Apple
title: 'Apple Maker Notes'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Apple\MakerNote
DOMNode: makerNote
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Apple
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
collection: ExifMakerNotes\Canon\Main
name: Canon
title: 'Canon Maker Notes'
handler: FileEye\MediaProbe\Block\Tiff\Ifd
DOMNode: makerNote
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Apple/RunTime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: AppleRuntime
title: 'Apple Runtime'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Apple\RunTime
DOMNode: plist
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Apple
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/AFConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ handler: FileEye\MediaProbe\Block\Index
DOMNode: index
format: Long
hasIndexSize: true
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/AFInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon AF Info'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\AFInfoIndex
DOMNode: index
format: Short
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/AFInfo2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\AFInfoIndex
DOMNode: index
format: Short
hasIndexSize: true
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/AFMicroAdj.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ handler: FileEye\MediaProbe\Block\Map
DOMNode: map
format: Long
hasIndexSize: true
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/Ambience.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ handler: FileEye\MediaProbe\Block\Map
DOMNode: map
format: Long
hasIndexSize: true
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/AspectInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon AspectInfo'
handler: FileEye\MediaProbe\Block\Index
DOMNode: index
format: Long
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CNTH.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CanonCNTH
title: 'Canon CNTH'
handler: FileEye\MediaProbe\Block\Index
DOMNode: index
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CTMD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CanonCTMD
title: 'Canon CTMD'
handler: FileEye\MediaProbe\Block\Index
DOMNode: index
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1000D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1000D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1DX.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1DX'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1DmkII.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1DmkII'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1DmkIII.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1DmkIII'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1DmkIIN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1DmkIIN'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo1DmkIV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo1DmkIV'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo40D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo40D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo450D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo450D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo500D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo500D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo50D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo50D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo550D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo550D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo5D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo5D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo5DmkII.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo5DmkII'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo5DmkIII.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo5DmkIII'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo600D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo600D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
2 changes: 1 addition & 1 deletion specs/Media/ExifMakerNotes/Canon/CameraInfo60D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Canon CameraInfo60D'
handler: FileEye\MediaProbe\Block\Exif\Vendor\Canon\CameraInfoMap
DOMNode: map
format: Byte
defaultItemCollection: Tiff\Tag
defaultItemCollection: Media\Tiff\Tag
compiler:
exiftool:
g1: Canon
Expand Down
Loading