MareroQ wrote:
And here is another dilemma - Python but which one?
Python2 is deprecated but needed for Gimp-2.10, Python3 is for Gimp 2.99 (dev3.0) which is still under development.
It's worth spending some time compiling the newest Gimp because it's only time consuming (for me 6-8 hours with a slow computer and poor internet connection)...
Compiling all of Gimp just to write a plugin is not what users should be doing. There should be a public API and a documented way of building the plugin in a platform independent way. While I could build something that would work for 64 bit Windows, there is no point if someone wants to use it with, say, a Linux 32 bit Scilab distribution. It's practically an unreasonable effort the way things are. Plus of course the Scilab dependency of what I want to do is also not supported though a how-to can be documented, and I don't blame Gimp for that because I don't expect Gimp to support everything any user could want.
I am considering Python. However, besides the Python 2 vs 3 issue, I need a fast matrix multiplication routine (and I don't mean a pointwise one). I think I need numpy for that, and that is not included in the Gimp Python distro. So then I would need to write a C plugin to Python in order to do this fast enough, but that again is a platform dependent build for C plugins to Python not supported by Gimp AFAIK. Writing a matrix multiplication using Python loops is almost certainly too slow. Besides that I need a QR and Givens transform that should be manageable in Python for my case but in general this involves Python loops, which generally should be avoided, and written in C. If Gimp supports numpy please let me know but I think it just supports what is ships, which does not include numpy.
I may try this in Python but I am almost certain that it will be too slow. If the next round of Gimp development would have support for Anaconda 2 and/or 3, that would solve a lot of problems and make it possible for Python plugins to leverage numpy and scipy.