Images blurry in PNG image cells

I'm developing a node that produces a table with several PNG image columns.

When I open the table the images appear slightly blurry. However, if I enlarge the column widths and row heights (manually with the mouse) just a 'hair', the images sharpen up. (I notice this with stock KNIME nodes as well).

I assume this is because at the original cell size, the image almost -- but not quite -- fits into the cell and is scaled down, causing the blurriness. 

I'm guessing that the KNIME code for setting the cell size doesn't add the width of the cell divider lines when calculating cell size to accomodate the image. You may need to add JTable.getIntercellSpacing().width and JTable.getIntercellSpacing().height to cell dimensions.

Kind regards,
Don

Hm, I haven't seen this one. We tell the Java JTable the preferred size of the cell contents and then I'm expecting the table to do the right thing. The displayed contents should need to care about spacing in whatever container component.

Hi Thor,

Thanks for your reply. Your logic is quite reasonable, but unfortunately this doesn't seem to be the way JTable works. I have attached a workflow and an image file that illustrates the problem. Instructions are in the workflow.

Also, after perusing several stackoverflow posts, such as  http://stackoverflow.com/questions/17858132/automatically-adjust-jtable-column-to-fit-content (see the last item on page), it appears developers are responsible for adding intercell spacing when calculating column widths and row heights.

In any case the fix is easy, and if it works customers will see a noticeable increase in image quality in tables.

Thanks,
Don Naki