SWT Image using AWT BufferedImage [message #438262] |
Fri, 18 June 2004 11:25 |
steven melzer Messages: 38 Registered: July 2009 |
Member |
|
|
i am using the technique outlined by Yannick Saillet on using Java2D and
SWT. the technique is to create an offscreen AWT BufferedImage, then
transfer the pixels (and in my case alpha channel) to an SWT ImageData,
then create your image with the ImageData. it seems to me that it would
be faster that instead of transferring pixels from AWT to SWT image
buffers, that the SWT Image object could use the AWT BufferedImage like it
uses the SWT ImageData, i.e. new Image(Device, BufferedImage).
i would not expect this to be part of the SWT itself, since it depends on
Java2D. but i believe all the information is available to create a valid
Image using BufferedImage. i would like to try this for myself though.
my problem is that Image is final and the Graphics.drawImage() method only
takes an Image.
i am looking for some suggestions on how to approach this. does anyone
have some thoughts on this?
thanks,
steve
|
|
|
Powered by
FUDForum. Page generated in 0.02588 seconds