GEF png fails when WebSphere run as a Windows Service [message #485070] |
Thu, 10 September 2009 13:11 |
Eclipse User |
|
|
|
Originally posted by: makbulut.us.ibm.com
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
as
those produced when NOT running WAS as a service.
- When we attempt to produce "thumbnail" images of our diagrams, the calls
fail.
The reason for the "thumbnail" issue is that the following calls:
Gdip.Image_GetWidth(img)
Gdip.Image_GetHeight(img)
end up returning 0, when they should instead be returning positive values
(as
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);
gc.setAdvanced(true);
if (gc.getAdvanced())
gc.setInterpolation(SWT.HIGH);
gc.drawImage(full,
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:
gc.setAdvanced(false);
rather than [from above]:
gc.setAdvanced(true);
the "thumbnail" conversion WILL work [when running WAS as a service], but
of
course the thumbnails produced are VERY grainy, so we don't see this as a
solution.
Any ideas?
Thanks
Burak
|
|
|
|
Powered by
FUDForum. Page generated in 0.03584 seconds