convert pixels to percent