fixed np calculation
Fixed NP calculation for windows
more keep-ratio configurability