change in png_from_table method

Modified the method to work with arrays