This difficulty is the reason why SweetFX works well with a great number of games: it simply changes the output image at the very end before it is presented on the monitor, and this point is easy to generically identify. Crucially, a library call or sequence of calls has to be determined which uniquely identifies what a program is doing at that given point in time.
The largest challenge when writing an interceptor (beyond the mechanics of interception) is understanding the original program's behavior and determining how to alter it in order to achieve the desired effect. That alone would generally just break rendering-you also need to adjust rendering viewports, projection matrices, scissor rectangles and potentially shader parameters to make it work-but this is the basic idea. DSfix took this request, changed the resolution to whatever the user desired, and gave the subsequently generated surface back to Dark Souls. In simplified terms, DS1 asked Direct3D for a 1024x720 surface to render the game to. As an example, think of Dark Souls 1 and DSFix.
It then reports its return values-or entirely different ones-to the program. An interceptor, as the name suggests, intercepts the program's library calls, altering them before they reach the library.