-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writing exif data does not work #16
Comments
please provide a namespaced snippet. |
here would be the relevant namespace:
but I can't find any output regarding this pacakge in my log file, I am using symfony 2.5.0 and the app/logs/dev.log file does not contain anything about phpexiftool. or is there another log I am missing? |
I have problems with Writing as well, used the example in readme file, same as hostingnuggets posted in his post. I get a white screen of death, no error in any logs what I can find. Read EXIF data works just fine, but then trying to create the Write object ($Writer = Writer::create();) the return will be white page of death. |
Hello guys, Please provide complete snippets of code, I can't do anything with pieces that I should assemble myself. |
Here is the code im trying to run: require __DIR__ . '/vendor/autoload.php';
use PHPExiftool\Writer;
use PHPExiftool\Driver\Metadata;
use PHPExiftool\Driver\MetadataBag;
use PHPExiftool\Driver\Tag\IPTC\ObjectName;
use PHPExiftool\Driver\Value\Mono;
$Writer = Writer::create();
$bag = new MetadataBag();
$bag->add(new Metadata(new ObjectName(), new Mono('Pretty cool subject')));
$Writer->write('test.gif', $bag); |
This should work: require __DIR__ . '/vendor/autoload.php';
use Monolog\Logger;
use PHPExiftool\Writer;
use PHPExiftool\Driver\Metadata\Metadata;
use PHPExiftool\Driver\Metadata\MetadataBag;
use PHPExiftool\Driver\Tag\IPTC\ObjectName;
use PHPExiftool\Driver\Value\Mono;
$Writer = Writer::create(new Logger('exiftool'));
$bag = new MetadataBag();
$bag->add(new Metadata(new ObjectName(), new Mono('Pretty cool subject')));
$Writer->write('test.gif', $bag); |
I am trying to add a copyright notice to photos using your package but unfortunately it does not seem to work, when running the "exif" command on the processed image file I get:
Corrupt data
The data provided does not follow the specification.
ExifLoader: The data supplied does not seem to contain EXIF data.
If I open the JPG image in GIMP it doesn't show many anything under the copyright tab of the image properties.
I use the following code which is pretty much the same as in your README:
and use v0.3 of the package. Any ideas?
The text was updated successfully, but these errors were encountered: