LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   XPutImage with zoom/scaling (https://www.linuxquestions.org/questions/programming-9/xputimage-with-zoom-scaling-346246/)

AngryLlama 07-24-2005 11:40 AM

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

AngryLlama 07-25-2005 02:12 AM

Just so you know, I decided to go with a temporary image. It seems to be the fastest and cleanest method.


All times are GMT -5. The time now is 12:44 PM.