$ 0 0 You can avoid that if you extent the line image to the desired width first and use image.height for the height.