LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2005, 11:40 AM   #1
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
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
 
Old 07-25-2005, 02:12 AM   #2
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Original Poster
Rep: Reputation: 31
Just so you know, I decided to go with a temporary image. It seems to be the fastest and cleanest method.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Font scaling issues oudent Slackware 7 07-25-2004 02:07 PM
Cpu power scaling SlackinMonkeee Slackware 1 02-07-2004 02:12 PM
scaling the display in X nowonmai Linux - Software 3 02-06-2004 01:32 AM
Scaling down Red Hat 9.0 mmurch01 Linux - Software 5 01-31-2004 12:26 PM
OpenOffice printing scaling C-Squared Linux - Software 0 11-11-2003 04:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration