Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A great module for Drupal 7 is the filtersie module which add a few sharpen filters. Instead of adding a Drupal 8 issue over there I decided to ask the question here instead to promote consolidation of image effects available to Drupal 8. Is this something which could be easily ported?
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-2658364-7-9.txt | 3.05 KB | drikc |
#9 | image_effects-2658364-9.patch | 21.75 KB | drikc |
Comments
Comment #2
slashrsm CreditAttribution: slashrsm as a volunteer commentedIt seems pretty straightforward. We should try to get approval from filtersie's maintainer.
Comment #3
drikc CreditAttribution: drikc commentedFiltersie use 2 different sharpening implementations:
1. "unsharp mask" which use the code here http://vikjavev.no/computing/ump.php
2. convolution with a predefined kernel that use concrete execution of either gd or imagemagick
So, I'm not the author of any of the concrete implementation; only integration in the drupal image effect. So anyone must feel free to use those...
That said, filtersie is toward filters image effect using convolution... I'll probably do a d8x in the future. Or perhaps it may be integrated into image_effects...
Comment #4
drikc CreditAttribution: drikc commentedThis patch implements convolution (as in filtersie) which allows to setup a multitude of filters like blur, emboss, sharpen, etc... See http://docs.gimp.org/en/plug-in-convmatrix.html.
Todos:
- Include a predefined sharpen filter using convolution
- Include the "unsharp mask" sharpen technique: http://vikjavev.no/computing/ump.php
- Implements tests
Comment #5
mondrakeCode looks good, setting to NW for todos in #4, plus:
can the classes/selectors also be made specific for this effect? Unless we believe that other effects could reuse.
Comment #6
drikc CreditAttribution: drikc commentedThis patch:
1. Implements tests for the convolution.
Tests if parameters are correctly passed to the toolkit; operation testing requires more work... Might be sufficient at the moment, also considering that operations are probably tested upstream at respective toolkit library.
2. Predefined sharpen filter
That is, using convolution
2. Convolution separate library
Dedicated css and js files
3. Imagemagick convolution (and predefined sharpen convolution)
Implemented but not tested at all...
4. README.md
Add an entry for convolution
Remaining todos:
Include the "unsharp mask" sharpen technique: http://vikjavev.no/computing/ump.php
Comment #7
drikc CreditAttribution: drikc commentedForgot README.md entry for the sharpen effect.
Comment #8
mondrakeI tested manually the ImageMagick implementation and it all works fine AFAICS. Nice job!
To me this is pretty much ready to go.
@drikc:
do you want to do that still here, or can we commit this and do the rest in another issue?
Some minor things:
Please add effects retaining the alphabetical order.
No blank line at end of file
This is wrong
... and this too
Please add interdiffs in new patches :) It helps reviewing
Comment #9
drikc CreditAttribution: drikc commentedOk, I will do the "unsharp mask" in an other issue.
Here's the update patch.
Comment #11
mondrakeGreat! Committed. Thank you @drikc