Another solution, which seems to be missing is to use function pointers; process_image could receive a pointer to given function instead of n. My experiences with gcc show, that functions passed by pointer are often inlined, which is not really a surprise, since they are constant arguments of the function.
Here is an example [0], although the wrapper functions seem to be redundant in this case.
Here is an example [0], although the wrapper functions seem to be redundant in this case.
[0] http://pastebin.com/BAgm61S8