Start with
wiki: SVG. The most common examples give fine control over image scaling, for example
illustrated ebooks with epub: using the svg image element. Scaling an image isn't what you want to do, but it shows how the automatic sizing to the screen works.