The side effects of the "cure" (interpolating in linear) are much worse than the "disease". Converting to linear gamma doesn't fix the stripe between the green and magenta areas, and with the algorithms I'm using, ringing artifacts become a big problem in dark areas, and a black pixel on a white background upsizes much differently than a white pixel on a black background:

[attachment=19349:int_linear.jpg]

Doing the distortion correction in a non-linear gamma works far better than in linear.

OK, it's been a long time since the last update. I've got the PSF generation and blur correction code working now, but it still needs a lot of fine-tuning before it will be ready for public consumption. Stay tuned...