Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF png fails when WebSphere run as a Windows Service
GEF png fails when WebSphere run as a Windows Service [message #485070] Thu, 10 September 2009 13:11 Go to next message
Eclipse UserFriend
Originally posted by:

We have an SWT-based converter.war file that we deploy on Websphere (and
Tomcat) to convert GEF-based diagrams to PNG or JPG files for a web client.

All works fine, except when Websphere is running as a Windows service.
When we disable running WAS as a service our image conversions work
without issues. However, if we enable running WAS as a service, two
issues arise:
- The images produced appear to be "grainy" and don't look nearly as nice
those produced when NOT running WAS as a service.
- When we attempt to produce "thumbnail" images of our diagrams, the calls
The reason for the "thumbnail" issue is that the following calls:
end up returning 0, when they should instead be returning positive values
they DO do when _not_ running WAS as a service).
More specifically, the code in play is the following:
Image shrunken = new Image(full.getDevice(), size.width, size.height);
GC gc = new GC(shrunken);
if (gc.getAdvanced())
0, 0, area / size.width, area / size.height,
0, 0, size.width, size.height);
That last call, gc.drawImage, ends up making the above mentioned calls to
Gdip.Image_GetWidth(img) and Gdip.Image_GetHeight(img).
We've noticed that if we use:
rather than [from above]:
the "thumbnail" conversion WILL work [when running WAS as a service], but
course the thumbnails produced are VERY grainy, so we don't see this as a

Any ideas?

Re: GEF png fails when WebSphere run as a Windows Service [message #487670 is a reply to message #485070] Thu, 24 September 2009 05:21 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member

Seems that the problem is with the device used.
I assume "full" is an SWT Image you're trying to paint, right? How did you generate that image? What was the device for it?
Did you try asking this question on SWT newsgriup?


Previous Topic:Attempting to export/deploy an Eclipse plugin I created, Eclipse complains of ba
Next Topic:Zest: Use of setUseHashlookup(false)
Goto Forum:

Current Time: Sat Apr 21 10:12:38 GMT 2018

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

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