Possible bug in PNGImageContent class?


I developed a custom node that creates an outport table with several PNG image columns. The images are small to medium, but it takes a little while for KNIME to save them. I can't say however, whether it takes unreasonably long or whether it is within reason (5 seconds for 150 (600 x 400 pixel) images to a SSD).

The interesting part is that when I inspect the results folder of my node I noticed a "blobs" subfolder. Furthermore, as I was perusing the source code for the PNGImageContent class I noticed a method that seems to me to contain a logical error: 

Should the comparison operator in the toImageCell method be ">=" instead of "<" ?  And should I expect the time to save the table will be reduced if this is indeed an error that gets corrected and my images are below the blob threshold?

I'm using KNIME SDK 2.11.2

    /** Minimum size for blobs in bytes. That is, if a given byte[] is at least
     * as large as this value, it will be represented by a blob cell */
    private static final long BLOB_SIZE_THRESHOLD =
                "org.knime.pngminblobsize", 40 * 1024);

    /** {@inheritDoc} */
    public DataCell toImageCell() {
        if (m_imageBytes.length < BLOB_SIZE_THRESHOLD) {
            return new PNGImageBlobCell(this);
        } else {
            return new PNGImageCell(this);


Yes, you are right, the comparison is wrong. Will be fixed in 2.12.