Skip to content

Commit

Permalink
LA_TEMP Investigating issue 25
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Apr 12, 2024
1 parent fec59cf commit fd21fd9
Show file tree
Hide file tree
Showing 10 changed files with 522 additions and 0 deletions.
44 changes: 44 additions & 0 deletions issue25/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Attempt at reproducing https://github.com/Frameright/php-image-metadata-parser/issues/25

### Quickly run my attempt

Make sure you have PHP interpreter and Composer installed on your system:

```bash
php --version
composer --version
```

Then run the following commands:

```bash
# Clone my attempt at reproducing the issue
git clone https://github.com/Frameright/php-image-metadata-parser
cd php-image-metadata-parser/issue25

# Install the latest version of the PHP library
composer require frameright/image-metadata-parser

# Run this simple PHP script (see details below about what it does)
./image-metadata-parser.php
```

This PHP script doesn't do much. It just loads the image file and prints out XMP metadata:

```
#!/usr/bin/env php
<?php
// load the pulled library:
require __DIR__ . '/vendor/autoload.php';
use CSD\Image\Image;
$image = Image::fromFile('reproducer.jpg');
$xmp_metadata = $image->getXmp();
// nicely format output with indentation and extra space:
$xmp_metadata->setFormatOutput(true);
print_r($xmp_metadata->getString());
```
5 changes: 5 additions & 0 deletions issue25/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"frameright/image-metadata-parser": "^1.1"
}
}
90 changes: 90 additions & 0 deletions issue25/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions issue25/exiftool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# exiftool -XMP -b reproducer.jpg | xmlstarlet fo > exiftool_output.xml
exiftool -XMP -b frameright.jpg | xmlstarlet fo > exiftool_output_good.xml
Loading

0 comments on commit fd21fd9

Please sign in to comment.