I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ?
This does definitely what you want: https://github.com/twain/wia-on-twain
I simulates a scanner and publishes a TWAIN and a WIA interface. Also the scanning of a graphical page is simulated, so you can try out different resolutions and colour schemes.