XPutImage with zoom/scaling
Hello,
I've been trying to find a way to draw an XImage to a display but have the image displayed 2X the size (double sized). Unfortunately, I don't think there is an existing solution. So that makes me think of two possible solutions:
1) I could allocate a new (larger) image. Then loop through my existing image and draw to the new image; doubling each pixel. I could then draw the image to the display and free the new image.
2) I could just loop through the image and Plot double the pixels to the XServer directly.
My image is constantly changing, and because of how the project is structured, I would have to recreate this "double size image" each time I wanted to draw. So which is faster? Allocating, drawing on client side, then Deallocating (option 1). Or sending a ton of messages to the XServer (option 2) ??
Thanks,
Paul
|