Notebook contents

How I doubled an image’s resolution without moving the animation

The footer rider follows a road traced on the original image. Keeping that coordinate grid fixed let me upgrade the artwork without shifting the ride.

Previous export 2040 × 680

A winding road through the Sahyadri hills in the original footer export.

Current export 4080 × 1360

The same hills and road in the higher-resolution footer export.
The same stretch of road, cropped from both exports.

Keep the tracing grid fixed

The first footer export was 2040 × 680, and every road point was traced in that grid. Using the new image dimensions to interpret those old points would move the rider. I kept the tracing grid at 2040 × 680 and re-exported the same composition at 4080 × 1360. Both exports have a 3:1 aspect ratio.

Map the grid to the crop

The image uses object-fit: cover. To match it, take the larger of the frame-to-grid width and height ratios. Scale each point by that amount, then add the horizontal and vertical crop offsets from object-position. That puts the image and the overlay in the same on-screen coordinate system.

  1. TraceFixed image grid
  2. MapCover scale and crop offset
  3. DrawGuide line and rider

Compare at the same scroll positions

I checked the image bounds, SVG paths, and rider position midway through the ride and at the end. They matched before and after at 1512px, 390px, and 320px. The same approach works for markers, annotations, and hotspots pinned to an image.

See the footer ride