calculate precent, pixel frame