return result;
}
private ConvolutionFilter readConvolutionFilter()
{
final ConvolutionFilter filter = new ConvolutionFilter();
filter.setMatrixX(bitStream.readUI8());
filter.setMatrixY(bitStream.readUI8());
filter.setDivisor(bitStream.readFLOAT());
filter.setBias(bitStream.readFLOAT());
int length = filter.getMatrixX() * filter.getMatrixY();
final float[] matrix = new float[length];
for (int i = 0; i < length; i++)
matrix[i] = bitStream.readFLOAT();
filter.setMatrix(matrix);
filter.setDefaultColor(readRGBA());
bitStream.byteAlign();
bitStream.readUB(6); // reserved
filter.setClamp(bitStream.readBit());
filter.setPreserveAlpha(bitStream.readBit());
return filter;
}