if (watermark != null && watermark.isEnabled()) {
Map<String, String> options = new HashMap<String,String>();
options.put("url", watermark.getURL());
options.put("opacity", Float.toString((255f - watermark.getTransparency())/ 2.55f));
MapDecoration d = new WatermarkDecoration();
try {
d.loadOptions(options);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Couldn't construct watermark from configuration", e);
throw new WmsException(e);
}