I've been thinking about how to frame the enhancement request for the functionality you requested, and I have some questions.
I'm curious to know what your ultimate goal is and what exactly you want to happen along the diagonals.
Suppose you have a diagonal line that crosses through a pixel just a tiny, tiny bit, should it get counted? Or perhaps it would be appropriate to determine the number of rows and columns the diagnol spans and then use hypot to figure out the number of pixels to sample uniformly along the line. (You can do that right now with improfile now, of course, for non-interactive syntaxes.)
So all of this gets me to the first question: What is your ultimate goal of having improfile return more pixel sites? How will you use that increased resolution?
(BTW, I'm not critiquing your request, I just want to make sure that we get a solution that will satisfy your use case.)