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

ConvolveMatrix test fails with an ImagingOpException #28

Open
carlosame opened this issue Jun 5, 2021 · 0 comments
Open

ConvolveMatrix test fails with an ImagingOpException #28

carlosame opened this issue Jun 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@carlosame
Copy link
Member

carlosame commented Jun 5, 2021

The ConvolveMatrix test (rendering of samples/tests/spec/filters/feConvolveMatrix.svg in SamplesRenderingTest.testFilterFeConvolveMatrix()) fails with an exception:

java.awt.image.ImagingOpException: Unable to convolve src image

This bug is the same as BATIK-1280.

The problem happens at line 404 of io.sf.carte.echosvg.ext.awt.image.renderable.ConvolveMatrixRable8Bit:

    // Easy case just apply the op...
    destBI = op.filter(srcBI, null);

which calls java.awt.image.ConvolveOp.filter(BufferedImage, BufferedImage) and there (line 197):

if (ImagingLib.filter(this, src, dst) == null) {
    throw new ImagingOpException ("Unable to convolve src image");
}

Once in ImagingLib.filter we get into ImagingLib.convolveBI(BufferedImage, BufferedImage, Kernel, int) which is where it fails (line 259): it tests for the convolveBI result being greater than zero which is not the case, and then returns the null value which triggers the exception.

It is difficult to debug what is going on in ImagingLib.convolveBI because it is native code.

@carlosame carlosame added the bug Something isn't working label Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant