3 ms·
any tips on plugging-in any 3rd party image processing filters? Maybe I looked in the wrong place, but could only see storage plugins on the wiki. For example,
by gingerlime 12y ago
any tips on plugging-in any 3rd party image processing filters? Maybe I looked in the wrong place, but could only see storage plugins on the wiki.
For example, we have a ruby-based library for converting images for different types of colour-blindness[0]. It's available from ruby, or via the command line. How could we use it as a filter in thumbor?
[0] https://github.com/kenhub/shikimo https://github.com/kenhub/shikimo
- heynemann 12y agoIt can be easily implemented as a filter[1][2]. If you need to use it via command-line you can save the current buffer as a tempfile[3], call your CLI with the tempfile path and read the tempfile to use as the new buffer. It's even simpler if your CLI can take a stdin argument, since you can just pass the buffer as a stdin parameter. Thumbor's filter infrastructure allows you to change the image incrementally. [1] https://github.com/thumbor/thumbor/wiki/Brightness https://github.com/thumbor/thumbor/wiki/Brightness [2] https://github.com/thumbor/thumbor/blob/master/thumbor/filters/brightness.py https://github.com/thumbor/thumbor/blob/master/thumbor/filte... [3] https://docs.python.org/2/library/tempfile.html https://docs.python.org/2/library/tempfile.html