-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feature/strip encoder parameter #1421
feature/strip encoder parameter #1421
Conversation
I added the option to the global configuration and set the default values on the encoders to $manager = ImageManager::withDriver($driver, strip: true); // set global default for all operations
$result = $manager->read('exif.jpg')->toJpeg(); // uses global default
$result = $manager->read('exif.jpg')->toJpeg(strip: false); // overrides global default
$result = $manager->read('exif.jpg')->toJpeg(strip: true); // overrides global default I'm also thinking about renaming the option from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, I like the global option, it makes it much easier.
As for GD, I agree, it just strips the exif metadata when encoding. I don't really like the method to create a new GD object and encoding to jpeg to remove it though as quality 100 for jpeg isn't lossless.
I would probably just disable the StripModifier
for GD and throw an exception that the GD driver already strips metadata when encoding.
I think |
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect, once thats merged, I'll fix image-driver-vips
to add that modifier
Cool. You can use intervention image |
No description provided.