Reading a Plot Directly from a File

I am aware of the case when you have a list of (x,y) data and then you are asked to find the best interpolating function using different criteria/methods. But, today my professor told me that even if you have an actual plot of x vs. y with its axes being marked with numbers, there is a code that you can “read” that plot directly into an interpolating function. I was told I don’t need to read points by eye; rather the code can do that. I am not aware of this and I thought maybe members have seen such feature in Root. I would appreciate if you kindly inform me whether this has been done.

Sincerely, … :TGraph@10

Thanks dear couet,
I cannot implement it easily. Since two tasks need to be mixed (reading + fitting) I cannot find a good macro to do that. I am still looking around the site to see if this is already done.