Take DPI into account when getting the OpenGL frame size for writeImage.
Requires 10.7 or above for convertRectToBacking.