Make sure pixel sizes are positive.