add sanity test
test for errors, return integer pixel dimensions