GetImage's output buffering could be smarter
There's some extra memcpy and buffering happening in the GetImage path. See this thread for some prior investigation.
Note that the "reserve output space" approach is about as good as you can do for pixmaps in device memory, but if you know they're in host memory you might also want to just
writev directly to the socket.