Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Image using AWT BufferedImage
SWT Image using AWT BufferedImage [message #438262] Fri, 18 June 2004 11:25
steven melzer is currently offline steven melzerFriend
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
Previous Topic:image/text order on
Next Topic:How to set Button color?
Goto Forum:
  


Current Time: Thu Apr 25 22:38:53 GMT 2024

Powered by FUDForum. Page generated in 0.02588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top