replaced parseInt with parseFloat for sub-pixel values