Hi Christoph,
Welcome to PixInsight development, and congratulations on a nice script!
The script works nicely for low-pass filters, but convolution with a high-pass filter requires fixing out-of-range values.
For example, if you convolve with a sharpening filter such as:
0 -1 0
-1 +6 -1
0 -1 0
there can be values outside the [0,1] range in the convolved result. This happens because the convolution routine applies a unit filter weight when there are one or more negative filter coefficients.
There are two ways of fixing out-of-range values: truncation and rescaling. Truncation to [0,1] is the standard procedure; it causes some data loss due to ringing, but preserves the overall brightness of the convolved image. Rescaling keeps all the data at the cost of a loss of dynamics, which is a nonstandard procedure (useful in some contexts, but not in the context of general image filtering).
So I think you should add a call to Image.truncate() in line #399 of your script, just after calling Image.convolve():
console.flush();
img.convolve( conv_matrix );
img.truncate();
vw.endProcess();
Hope this helps.