The preprocessing using ScanTailor(black and white image)

I made a DLL file to use ScanTailor cmd comand in order to produce a
black and white image.
The DLL is working but we will probably need to update it.
Anyway here is the code.