Reverse engineering from photo hack

I’m interested in electronics and occasionally try to fix or modify things. When trying to figure out how a circuit works in the past, I’ve used GIMP (graphics editor) and inserted pcb photos and traced it on different layers. But then to see the schematic, you have to lay it all out again.
Target 3001! has an option to import a photo for tracing, but the free and lightweight versions have a very limited number of pins for reverse engineering and I can’t justify the cost of higher versions for occasional hobby use.
If I remember right, Kicad can only import .svg’s (or I think 2 colour bitmaps which can be time consuming/difficult to make from a photo) and it’s not possible to update the schematic from the pcb layout.
Fritzing, on the other hand, does update the schematic from the pcb! Plus it’s open source!
I’ve tried learning a bit of C++ in the past, my level of knowledge is at a similarly low level to my electronics knowledge. But following this guide and BobWood’s post in this thread plus adding 7zip to path I was able to build Fritzing and have a go at modifying it.
What I ended up doing was:
In pcbsketchwidget.h in the class definition for PCBSketchWidget (on line 39) add:
QGraphicsPixmapItem *pic;

In pcbsketchwidget.cpp in the PCBSketchWidget constructor (on line 133) add:
pic = scene()->addPixmap(QPixmap(“pcb.jpg”));

In schematicsketchwidget.cpp in the SchematicSketchWidget constructor (on line 56) add
delete pic;

The code creates the QGraphicsPixmapItem ‘pic’ from pcb.jpg (placed in the same directory as Fritzing.exe), adds it to the graphics scene in the pcb window, and the last bit prevents it from also showing up in the schematic window. It also shows up in the parts editor but wasn’t enough of a problem for me to try to figure out how to prevent that. The setScale(0.177) sizes the image so that it’s 20 pixels per mm.
How I work with it is I have photos of the top and bottom of the pcb, pcbt.jpg and pcbb.jpg (the bottom photo has to be mirrored to show up the right way when working on the underside of the board) and whichever one I want to work on, rename it to pcb.jpg so it loads when I open the Fritzing file.

Anyway I thought I’d share in case it’s a useful mod for someone else.