ensure size is at least 256px (just in case)
calculate zoom level where units-per-pixel = 1