implement png import/export

palette export works fine, but palette import is disabled for now