|
Thanks, Miguel. I have just downloaded v10.2 and used the new code that supports transparent background. I suggest that a switch in the scripts or API be used to allow one to turn this on/off. By default, it should be off for the majority of users who do not care about the transparency effect. "Miguel" <[EMAIL PROTECTED]> writes: I have found the CPU-consumption performance problem reported by Nico. I have not yet checked in the bug fix ... it is a simple change, but I want to figure out how to do it without losing some functionality. The problem has to do with use of the 'alpha channel' when the image is constructed. This change caused additional CPU processing when the image is blitted to the screen. I introduced the problem in response to a request for additional functionality. Charles (of the Concord Group) asked for a translucent background so that they could take Jmol images and overlay them on top of other images. He sent me some sample code and showed me that it was a simple change to the image color model. It was an easy change. I introduced 'color background translucent' as a script command so that he could control it. The old code was creating the image with a 24-bit RGB color model. With a 24-bit color model the RGB values are taken directly and applied. There is no such thing as the 'alpha' channel for translucency. The 32-bit ARGB color uses another byte to determine the level of translucency. We always set the transluceny to either 0 (transparent) or 255 (fully opaque). When a 32-bit ARGB image is painted then the alpha channel value must be tested. This is consuming quite a bit more CPU than I expected ... and I should have known better. Clearly I should have done some performance impact testing before introducing the change. I apologize for wasting people's time on this. At this point, I need to think about the best/easiest way for us to allow the 'color background translucent' functionality without paying the performance penalty unless it is actually used. Charles, Please confirm that your group is actually using this functionality. |
- [Jmol-developers] CPU performance problem found Miguel
- [Jmol-developers] Re: CPU performance problem found Charles(Qian) Xie
- Re: [Jmol-developers] Re: CPU performance probl... Egon Willighagen
- Re: [Jmol-developers] CPU performance problem found Bob Hanson
