Kicad is missing a feature to resize jpegs with dimensions. PCB images are used for reverse engineering and images are resized to the dimensions of the PCB. Two points are selected in the image, the user tells Kicad the distance and Kicad enlarges or shrinks the image. One resize for horizontal and one for vertical. Kicad is missing the feature.
Like this:
I added 1,2,3, and 4 point image adjustments. It does not do flipping, that should be done first.
The scale bar is cute, and has utility - but clicking points was much less change to the kicad UI.
I had a rectangular PCB, so I could draw a box of the dimensions, easy.
Otherwise I would make 2 triangles of 4 furthest calibration points. Ideally you would also have a horizontal or vertical reference. Layout (e.g. measure D1, D2, D3, D4, we already know the DIP package size) those 4 points then register the image to them.