I'm using the Image Server to generate images and it appears to work
pretty well. What I haven't been able to figure out is how create an
image with a transparent background. How do I go about doing that? If
I set the background to be transparent, An image is created that has a
black background.
Here's the code I use to create the image:
_server = new ImageServer(_handler.getProperties());
_server.setBackground(new Color(153, 179, 204, 0));
_currentProjection.setCenter(centerLat, centerLon);
_currentProjection.setScale(scale);
byte[] imageData = _server.createImage(_currentProjection, _width,
_height, getVisibleLayers());
BufferedImage image = null;
try {
image = ImageIO.read(ImageIO.createImageInputStream(new
ByteArrayInputStream(imageData)));
} catch (IOException e) {
e.printStackTrace();
}
Is there a way to make it transparent? Thanks.
Jay
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Sep 18 2007 - 11:18:17 EDT