-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
522 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require": { | ||
"frameright/image-metadata-parser": "^1.1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.