tests for image types, fix bug with saving image types