Dear,
I created a program performing a high number of copyarea's per second (contents of jpanel moving from right to left), using a thread. As a number of other threads are running at the same time, the copyarea thread shouldn't take too much time. On my specific PC configuration, each copyarea takes about 20 milliseconds. Due to the other threads also running, I cannot request for more than about 20 copyareas per second (i.e. 400 ms per second taken up by calls to copyarea). I noticed that copyarea will take less time when the number of colors (cfr. Control Panel -> Display settings in Windows) is lowered. When I lowered from 16 million to 256 colors, a copyarea took less than 10 milliseconds. This means I can easily request 40 copyareas per second, which is fine for my purposes (the number of colors isn't that important for the purpose of my program).
Now my question is: is there a way to change the number of colors of the OS by a method call within Java (which would be called during startup of program and when leaving the program), or, even better, is it possible to achieve the copyarea speedup effect by using a colorspace object in Java (or something similar), give it a low number of colors, and apply it to the jpanel ? From what I read, colorspace can be applied to an image, but not to the Graphics context of an object, i.e. even if you would draw a black-and-white image to the Graphics context, the copyarea call will still treat the pixels in the 16 million color framework.
Thanks for any help,
Tom
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".