We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The below should work, right?
$formats = [ 'jpg', 'png' ]; foreach ($formats as $format) { $im = new Imagick(); $im->newimage(50, 50, 'blue'); $im->setimageformat($format); $im->setImageProperty('Exif:Make', 'a property'); $im->writeimage('./output.'.$format); $im->destroy(); $im2 = new Imagick('./output.'.$format); printf("Format %s *****\n", $format); printf("Property value %s\n", var_export($im2->getImageProperty('Exif:Make'), true)); $im2->destroy(); }
Format jpg ***** Property value false Format png ***** Property value 'a property'
The text was updated successfully, but these errors were encountered:
For Jpeg, the only property that is persisted is one named 'comment'.
$propertyNames = [ "comment", "anything_else" ]; $formats = [ 'jpg', 'png' ]; foreach ($formats as $format) { foreach ($propertyNames as $propertyName) { $imagick = new Imagick('./LittleRobin.jpg'); $imagick->setImageProperty($propertyName, "Modified value"); $imagick->setFormat($format); $imagick->writeImage("./testModified.".$format); $imagick2 = new Imagick("./testModified.".$format); printf( "After reloading '%s' property '%s' is:%s\n", $format, $propertyName, var_export($imagick2->getImageProperty($propertyName), true) ); } }
Sorry, something went wrong.
To summarise:
Those two bits of info need to be added to http://php.net/manual/en/imagick.setimageproperty.php
Source of info: ImageMagick/ImageMagick#55
No branches or pull requests
The below should work, right?
The text was updated successfully, but these errors were encountered: