-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Use Imagick
class
#6754
base: v5/develop
Are you sure you want to change the base?
Use Imagick
class
#6754
Conversation
I don't have any idea about IM. I've run unit tests. Getting following error for all provider for
|
9047372
to
1e35132
Compare
1e35132
to
f9ee3e0
Compare
It's no help with the todos (sorry about that) but I was just thinking if we maybe could change the driver name to "imagick" for this and keep the old "im" driver? Then it wouldn't be a breaking change, but more important: the preferred name would be a lot better. |
ac33204
to
cc73571
Compare
I have some doubts about calling A short test for demonstration (not a solution): function doTest(string $file, string $ext) {
$image = new Imagick($file);
// get the ICC profile before stripping
$profiles = $image->getImageProfiles('icc', true);
// strip all metadata
$image->stripImage();
// re-apply the ICC profile
if ($icc = $profiles['icc'] ?? null) {
$image->profileImage('icc', $icc);
}
// save the image
file_put_contents('./output-wrong.' . $ext, $image);
// destroy the image
$image->destroy();
// re-open the output image and apply the ICC profile without calling stripImage
$image = new Imagick('./output-wrong.' . $ext);
if ($icc = $profiles['icc'] ?? null) {
$image->profileImage('icc', $icc);
}
// save the image
file_put_contents('./output-correct.' . $ext, $image);
// destroy the image
$image->destroy();
}
doTest('./png-adobe-rgb-gps.png', 'png');
doTest('./onigiri-adobe-rgb-gps.jpg', 'jpg'); Execute this in a folder with the The ICC profiles being present in:
I know the top comment in the PHP guide about Imho this looks like a bug in either Imagick or ImageMagick, because other file formats seem to work ootb. |
Description
Help needed
: Cannot figure out why ICC profile isn't preservedImagick
objectSummary of changes
Imagick
class forimagick
darkroom driverim
(ImageMagick
class)Changelog
Enhancements
imagick
thumbs driver, using theImagick
class instead of command lineimagick
thumbs driver does not respectbin
optionDeprecated
im
driver option, useimagick
insteadReady?
For review team