Skip to content

ConvolveMatrix test fails with an ImagingOpException #28

Open
@carlosame

Description

@carlosame

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions