Skip to content
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

Added trimImage option for Imagick #418

Closed
wants to merge 1 commit into from

Conversation

antonioperic
Copy link

No description provided.

@romainneutron
Copy link
Collaborator

Hello and thanks for your work.

However, we can not integrate driver-only feature in imagine. If you want to create such feature, I recommend you to create your own service and apply them using Imagick\Image::getImagick method

@romainneutron romainneutron mentioned this pull request May 6, 2015
@igormukhingmailcom
Copy link

By the way there are driver-independent implementation of trim function.
See 4-th message at liip/LiipImagineBundle#586
It has conditional for using Imagick's built-in trimImage function for more performance.

@antonioperic
Copy link
Author

@igormukhingmailcom did you add this at the end?
I resolved my case with listener it works, but it will be nice to have trim filter inside

@igormukhingmailcom
Copy link

@antonioperic I used that code (maybe with some small modifications) only on my project and not performed any PR yet.

@antonioperic
Copy link
Author

@igormukhingmailcom thnx for sharing it

@igormukhingmailcom
Copy link

@antonioperic I thinking around how to test code right way. Because same fuzz may give different result for native Imagick's and self-writed implementation's output.

I think that should be some source image with linear gradient to test with. And both functions must remove same part of image during trim.

@AlmogBaku
Copy link

Any update about adding @igormukhingmailcom PR? (well kinda PR)

@antonioperic
Copy link
Author

@AlmogBaku I don't think this option will be merged see comment at the begging. But from code you can see how to use it.

@igormukhingmailcom
Copy link

@AlmogBaku Hi. That code example can't be added, because it designed to use as extension for LiipImagineBundle at AppBundle. So you can copy-paste it to your AppBundle to use.

(I'm talking about liip/LiipImagineBundle#586)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants