[OpenMap Users] Image Server

From: Jay D. Askren <jda_at_email.domain.hidden>
Date: Tue Sep 18 2007 - 11:21:25 EDT

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@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Sep 18 11:24:32 2007

This archive was generated by hypermail 2.1.8 : Tue Sep 18 2007 - 11:24:34 EDT