Skip to main content



      Home
Home » Archived » Visual Editor (VE) » AWT image to SWT
AWT image to SWT [message #60049] Wed, 15 September 2004 11:26 Go to next message
Eclipse UserFriend
Hello.

I'm trying to convert AWT image to SWT under Linux.
I wrote my own ImageConsumer implementation and it works fine
but too slow under Linux: converting image with dimentions 450x380
takes up to 3 secs.
Maybe VE team have found a faster way to make screenshot of AWT window?
If so, please give me a hint how to do this.

--
Alexander Mitin
Re: AWT image to SWT [message #60096 is a reply to message #60049] Wed, 15 September 2004 11:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

We did that, and the actual conversion is very fast. However we did find
getting the actual image (when doing a print of an AWT control) was a
lot slower than the actual conversion.

The conversion is done in

org.eclipse.ve.internal.jfc.vm.ImageDataCollector, mostly in the
setPixels methods. This converts into a stream on a remote vm which is
then sent via sockets to the main Eclipse IDE, where there is a
corresponding org.eclipse.ve.internal.jfc.core.ImageDataCollector which
takes that stream and puts it into an ImageDescriptor.



--
Thanks, Rich Kulp

Re: AWT image to SWT [message #60168 is a reply to message #60096] Thu, 16 September 2004 11:13 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for fast reply.
You're using the same technology for getting pixels from AWT image
as me: ImageConsumer implementation. Yes, getting actual image is
dramatically slow under Linux. I measured time with which setPixels
method sequentially called: it tooks 50-60 ms between two setPixels calls!
It seems to me that BufferedImage uses native calls to draw itself.
Maybe exists the way to force the control to print itself into some
"image" which is actually not an image but some fake to keep pixels?
Re: AWT image to SWT [message #60190 is a reply to message #60168] Thu, 16 September 2004 11:40 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I don't know , but on GTK in the VE we don't see such slow responses. At
least not on any machines we tried. Try the VE on your machine and see
if the getting a new image after changing the text of a button for
example takes as long as yours does. Put it on shell that is as large as
the example you were trying.

Alexander Mitin wrote:
> Thank you for fast reply.
> You're using the same technology for getting pixels from AWT image
> as me: ImageConsumer implementation. Yes, getting actual image is
> dramatically slow under Linux. I measured time with which setPixels
> method sequentially called: it tooks 50-60 ms between two setPixels calls!
> It seems to me that BufferedImage uses native calls to draw itself.
> Maybe exists the way to force the control to print itself into some
> "image" which is actually not an image but some fake to keep pixels?
>
>

--
Thanks, Rich Kulp

Re: AWT image to SWT [message #598526 is a reply to message #60049] Wed, 15 September 2004 11:44 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

We did that, and the actual conversion is very fast. However we did find
getting the actual image (when doing a print of an AWT control) was a
lot slower than the actual conversion.

The conversion is done in

org.eclipse.ve.internal.jfc.vm.ImageDataCollector, mostly in the
setPixels methods. This converts into a stream on a remote vm which is
then sent via sockets to the main Eclipse IDE, where there is a
corresponding org.eclipse.ve.internal.jfc.core.ImageDataCollector which
takes that stream and puts it into an ImageDescriptor.



--
Thanks, Rich Kulp

Re: AWT image to SWT [message #598547 is a reply to message #60096] Thu, 16 September 2004 11:13 Go to previous message
Eclipse UserFriend
Thank you for fast reply.
You're using the same technology for getting pixels from AWT image
as me: ImageConsumer implementation. Yes, getting actual image is
dramatically slow under Linux. I measured time with which setPixels
method sequentially called: it tooks 50-60 ms between two setPixels calls!
It seems to me that BufferedImage uses native calls to draw itself.
Maybe exists the way to force the control to print itself into some
"image" which is actually not an image but some fake to keep pixels?
Re: AWT image to SWT [message #598552 is a reply to message #60168] Thu, 16 September 2004 11:40 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I don't know , but on GTK in the VE we don't see such slow responses. At
least not on any machines we tried. Try the VE on your machine and see
if the getting a new image after changing the text of a button for
example takes as long as yours does. Put it on shell that is as large as
the example you were trying.

Alexander Mitin wrote:
> Thank you for fast reply.
> You're using the same technology for getting pixels from AWT image
> as me: ImageConsumer implementation. Yes, getting actual image is
> dramatically slow under Linux. I measured time with which setPixels
> method sequentially called: it tooks 50-60 ms between two setPixels calls!
> It seems to me that BufferedImage uses native calls to draw itself.
> Maybe exists the way to force the control to print itself into some
> "image" which is actually not an image but some fake to keep pixels?
>
>

--
Thanks, Rich Kulp

Previous Topic:[ANN] XSWT Relaunched
Next Topic:Testing a JInternalFrame object
Goto Forum:
  


Current Time: Sun May 11 11:25:43 EDT 2025

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

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

Back to the top